Jump to content
Sign in to follow this  
-J4F-Thunder666

add new Waypoints all Units inside a trigger Area ?(urgent)

Recommended Posts

hi all,

urgent Question: editing a coop. at one Point Civ`s in a Trigger Area should have a new WP and move to the new WP.

I tryed this >> {_x addwaypoint[getmarkerpos "e3",10];} forEach list Area3; but nothing happen :( . Please help me !

Greetings

Share this post


Link to post
Share on other sites

If you just add a new waypoint to some group, the groups former waypoints are still there. Remember: waypoints are like a stack: a list of waypoints is processed serially one after the other. Some waypoints don't even "halt" without further commands, so your group might be stuck with such a waypoint, never proceeding to the (next) one, you've put onto the groups waypoint list at some later time...

Thus: first you have to empty this list of waypoints for every group your trigger affects (waypoints, deleteWaypoint). Then you can add your new waypoint and make sure it's the current one.

Ok, you probably could skip the "clear the waypoints" step and simply make sure that your new one is the current one with setCurrentWaypoint. But you should get the idea.

Share this post


Link to post
Share on other sites

Hi,

thx for Answers.

@Fuzzy: yeah thats ok and i tryed this before but the Problem with "do move" is , the Guys then all at same Point. With WP i can set a Radius.

@ruebe: the Problem isnt the WP, it is only one WP and i set this to "move" and so on.

The Problem is the Syntax in {_x addwaypoint[getmarkerpos "e3",10];} forEach list Area3.I am not good with scripting.But i think this Order must be possible.

Greetings

Share this post


Link to post
Share on other sites

I've used this in the past to scatter men to several positions.

place this in a init box var=["one","two","three"]

place your markers and name them one,two,three

Place a trigger

anybody present

on act

{_x domove getmarkerpos  (var select floor random 3);} forEach thislist 

place the men you want to scatter inside the trigger ungrouped and away you go.

nearly forgot your code will work with a little fixing.

Using the markers and var names as above and this in the trigger.

{group _x addwaypoint [getmarkerpos (var select floor random 3), 50]} forEach list Area3

Area3 being the name of the trigger or you can use thislist.

if you just want them all to go to one place then it would be almost as you had it.

{group _x addwaypoint [getmarkerpos "e3", 50];} forEach list Area3

Edited by F2k Sel

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  

×