how does the MRAD Probe display the distence form it to the player
and how do i ues the func if possible
MRAD Probe distance
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:




"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
- alterecco
- Fleet Officer
- Posts: 1658
- Joined: Wed Jan 14, 2009 3:08 am
- Location: Previously enslaved by the Iocrym
The MRAD Probe dockscreen uses (sysVectorDistance ...) to display distance between two objects. Look at the function mradDisplay in Heretic.xml line 5943 for details.
Please post general modding questions in Shipyards, not Bugs and Brainstorms.
Please post general modding questions in Shipyards, not Bugs and Brainstorms.
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
i am talking about the little green arrow with the distance form the player to the probe under it




"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
ok i answered my own question
will make an ares phobos, a arrow pointing to the phobos and will display the distance form the phobos to the player under the arrow 
(incase any one was interested)
Code: Select all
(setq theTarget (sysCreateShip &scPhobos; targetPos &svAres;))
(objSetShowAsDestination thetarget True)

(incase any one was interested)




"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
now when i use this
i get the "interger expected" error.
and i also found out that in the intro if a ship has a error with its <ondestroy> it prints it (the error) in the log
Code: Select all
(setq arescap (sysFindObject gSource "T:arescap"))
(objSetShowAsDestination arescap True)
(objSetIdentified arescap)
i get the "interger expected" error.
and i also found out that in the intro if a ship has a error with its <ondestroy> it prints it (the error) in the log





"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
Code: Select all
(setq arescap (sysFindObject gSource "T:arescap"))
(objSetShowAsDestination arescap True)
(objSetIdentified arescap)
sysFindObject returns a list of spaceObjects, in your example, a list of stations with the attribute arescap.
objSetIdentified only works with spaceObjects, not a list of space objects so you need to identify the list individually in an enum.
Code: Select all
(enum (sysFindObject gSource "T:arescap") spaceObj (block Nil
(objSetShowAsDestination spaceObj True)
(objSetIdentified spaceObj)
))
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
there should only be on station with the "arescap" attribute in the system
but whats weird is that
still gives me the "interger expected" error but it makes an arrow pointing to the station i want it to 
but whats weird is that
Code: Select all
(enum (sysFindObject gSource "T:arescap") spaceObj (block Nil
(objSetShowAsDestination spaceObj True)
(objSetIdentified spaceObj)
))





"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
- alterecco
- Fleet Officer
- Posts: 1658
- Joined: Wed Jan 14, 2009 3:08 am
- Location: Previously enslaved by the Iocrym
even when there only is one result returned from sysFindObject it is still wrapped in a list. The only exception to that rule is when the criteria include 'N'; then there is only returned the nearest matching object, not wrapped in a list
The easiest thing to do would just be
The easiest thing to do would just be
Code: Select all
(block (aresCap)
(setq aresCap (sysFindObject Nil "N T:arescap;"))
(if aresCap (block Nil
(objSetShowAsDestination aresCap True)
(objSetIdentified aresCap)
))
)
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
i found what was making the error
i deleted the (dbglog and forgot to delete the test4 text
Code: Select all
(setq F4 (lambda nil
(block nil
(enum (sysFindObject gSource "T:arescap") spaceObj (block Nil
(objSetShowAsDestination spaceObj True)
; (objSetIdentified spaceObj)
)))
test4
))




"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"