Jump to content
Sign in to follow this  
dragonsyr

waituntil unit is in waypoint ???

Recommended Posts

i have this

....blah blah;
_wpheli = h1 addWaypoint [position _helitarget, 20];
	[h1, 2] setWaypointBehaviour "CARELESS";
	[h1, 2] setWaypointCombatMode "BLUE";
	[h1, 2] setWaypointSpeed "FULL";
waitUntil {h1 is in _wpheli};
hint"unit is in place";

how can i do that?

also , how can i add waypoint position without the use of an object?

Edited by dragonsyr

Share this post


Link to post
Share on other sites

Something like ...

_wpheli = h1 addWaypoint [position _helitarget, 20];
_wpheli setWaypointBehaviour "CARELESS";
_wpheli setWaypointCombatMode "BLUE";
_wpheli setWaypointSpeed "FULL";
waitUntil { (currentWaypoint (_wpheli select 0)) > (_wpheli select 1) };
hint"unit is in place";  

Wait until the current waypoint of the group of the added waypoint is greater than the added waypoint index.

Share this post


Link to post
Share on other sites

Expanding on what Larrow says, you can just use the _wpheli reference instead of [h2, 2] as the _wpheli variable is in the format [group, index] anyway.

Share this post


Link to post
Share on other sites

thank you guys !!! you r very helpful !! works

waitUntil { (currentWaypoint (_wpheli select 0)) > (_wpheli select 1) };

---------- Post added at 19:45 ---------- Previous post was at 19:42 ----------

also , how can i add waypoint position without the use of an object?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×