Jump to content
Sign in to follow this  
thetrooper

setWPpos, marker waypoint?

Recommended Posts

Hi, I'm trying to set a unit to move to a marker as a waypoint but for some reason it's not working. Anyone got any ideas? I was under the impression that if I put this in his init he would move directly to MarkerOne.

[dave, 1] setWPPos getMarkerPos "MarkerOne";

Share this post


Link to post
Share on other sites

Is "dave" the groupname ?

You need to name your group via -> mygroup = group this !

Then try this:

[mygroup, 1] setWPPos markerPos "MarkerOne";

Share this post


Link to post
Share on other sites

The WP must be pre existing i guess.

If not,

dave doMove (getMarkerPos "Markerone")

is nice.

Share this post


Link to post
Share on other sites

yeah that one works. Now the quetion would be how you would do this with a group? Only seems that this way works for a single unit.

Edited by TheTrooper
additional problem

Share this post


Link to post
Share on other sites

In the leaders init:

mygroup = group this;

And then:

mygroup move (getMarkerPos "Markerone");

I would use move anyway... ;)

Share this post


Link to post
Share on other sites

How is this different than just using Waypoints/Waypoint and in what case or scenario would I use this?

Thx

Share this post


Link to post
Share on other sites

OK I'm using it for this: Depending what and where a trigger is hit, means that you can direct opposing forces to a particular area where you place a marker.

Now thinking about it, it would probably work a treat with an escape and evasion scenario.

Share this post


Link to post
Share on other sites
How is this different than just using Waypoints/Waypoint and in what case or scenario would I use this?

Thx

Using doMove you can move just one or two units in the group without moving the whole group... which is the way move and addWayPoint both work.

As an example.... you would use it if you wanted two guys to break off from your group and go search a building.

EDIT: More...

To check that a unit actually got to the position.... use something like waituntil {not (alive _soldier) or unitready _soldier};

Edited by twirly

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  

×