PDA

View Full Version : Ordering a unit to a pos & catch arrival of dest.?



SkogUlv
Dec 14 2006, 20:10
I'm working bit on some theory here and need some input.

I can make a unit go from wherever to a new location in different ways, but whats the best method / combination to send a unit from a location to another location AND then react with another script WHEN the unit reaches his destination?

What I need todo is remove the unit when he have reached his destination (and preferably also if he CANT reach his destination).

I could use waypoints in the editor but thats a no good for this purpose as I need to move them using a script to all sorts of positions.

feersum.endjinn
Dec 14 2006, 20:19
These might help.

http://community.bistudio.com/wiki/unitReady

http://community.bistudio.com/wiki/currentCommand

SkogUlv
Dec 14 2006, 21:30
Thanks that helps quite alot , but of course I got another question on the same issue.

Now that I know how to check with unitReady, and I need to spawn say 500 of them .. Using a loop to test each individual would become a problem, any smarter way of doing so ?

Korax
Dec 14 2006, 22:44
You could always use the AddWaypoint and SetWaypointStatements (http://community.bistudio.com/wiki/setWaypointStatements) commands.