Phoenix
Registered:1396475941 Posts: 2
Posted 1396477316
Reply with quote
#1
Hi all.
Writing my first mission using the mission editor and I've ran into a problem.
Is there a way to do an if_distance between the player ship and a fixed point (i.e. a co-ordinate) rather then another object ?
I looked on the wiki and that would seem to suggest you can use pointx/y/z="00000" as arguements but either I'm getting the syntax wrong or it doesn't work.
Can anyone help ? Thanks in advance.
leaola
Registered:1386628133 Posts: 268
Posted 1396479230
Reply with quote
#2
I think u can make a mesh object at the point and make it reallllllly small so no one can see it. I know in the artemis editor I created a script that creates an object a "x", "y","z" were x,y,z are 'strings' with random values and the editor wants #'s and tells me it wont work but when playing it does, so whats telling u it wont work the editor or the game?
Arrew
Registered:1393602597 Posts: 2,750
Posted 1396536327
Reply with quote
#3
Use the if it is inside or outside sphere command. That should do what you want. Just set the size of the sphere to the distance you want.
Mike Substelny
Administrator
Registered:1375273622 Posts: 2,990
Posted 1396544291
Reply with quote
#4
Yes, the inside sphere command is intended to check the distance between a named object and a fixed point in the sector. It does exactly what you need.
__________________"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight." - Winston Churchill
Phoenix
Registered:1396475941 Posts: 2
Posted 1396562272
Reply with quote
#5
Yeah - sod's law, about an hour after posting this I figured I could use the sphere command Ta for replying anyway.