Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Using the distance between two things to trigger an event
Using the distance between two things to trigger an event
2000-12-22, 1:12 PM #1
Basically, I want an event to trigger when two things reach a certain distance apart (approx 5 JKUs). I'm sure there is a command that I can use, but I am neither certain on what it is or how to use it, anyone care to share any light on the subject?

------------------
Anthony Piggott
E-Mail: akpiggott@eidosnet.co.uk
ICQ: 41235225
Homepage: http://pages.eidosnet.co.uk/~akpiggott/
Xbox Live/PlayStation Network/Steam: tone217
http://twitter.com/ourmatetone
2000-12-22, 6:17 PM #2
Something like:

Code:
if (VectorDist(GetThingPos(thing1), GetThingPos(thing2)) > 5)
{
  // do something
}


Just put it inside a pulse() message.

Cheers...

Raynar


------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2000-12-23, 12:23 AM #3
Ahh, that's it, thanks.

------------------
Anthony Piggott
E-Mail: akpiggott@eidosnet.co.uk
ICQ: 41235225
Homepage: http://pages.eidosnet.co.uk/~akpiggott/
Xbox Live/PlayStation Network/Steam: tone217
http://twitter.com/ourmatetone

↑ Up to the top!