Jump to content
Sign in to follow this  
noewon

Using dostop with a group

Recommended Posts

I'm attempting to set up an ambush in an urban environment and don't want the group to be standing in any the usual formations as they arrange themselves outside the building or in the next compound. In the editor, I need the units to remain in the location they've been placed, not return to formation. I've tried using dostop this and thislist on the group to get them to remain in the location I've dragged them, but they just ignore any commands and stroll back to formation. How do I get them to stick? 

 

domove doesn't seem to work... unless I'm getting the syntax wrong.

 

 

Share this post


Link to post
Share on other sites

Use forceSpeed (_unit forceSpeed 0). Setting the value to a negative resets the unit.

Share this post


Link to post
Share on other sites

How do I address the entire group? Every command I'm trying (forcespeed, enablesimulation etc) keeps giving me the error "Type group, object expected" when testing the scenario.

Where is this command supposed to go? Object init? Composition init? In other words, how do I reference the entire group?

 

 

Share this post


Link to post
Share on other sites

OK.. this is driving me nuts.  I've tried dostop, disableAI "move", forcespeed, none work.  Where should the command go? 

In:

Comoposition init?

Object init?

On the a hold waypoint referencing  the group?  oh, but wait.. that doesn't work, it generates an error "type group, object expected". How the F do you reference an entire group then? 

 

Read the wiki.. commands don't work. 

Share this post


Link to post
Share on other sites

In initialization of leader unit

 

{ doStop _x } foreach units group this;

 

'This' refers to unit object

Group this refers to unit's group ( used optionally here since units cmd allows object as parameter )

Units group this returns an array of all units in the leader's group

 

Foreach runs code on every element in the provided array.

_x is a magic variable that refers to the current element in the foreach loop.

doStop should force an unit to stop. Otherwise use _x disableAI "MOVE"

 

Also check if you have any AI mods running.

 

Kind regards, 

Sanchez 

Share this post


Link to post
Share on other sites

hooF!@#nrah.    it works.

When the appropriate trigger is tripped, dofollow gets them all moving again and shenanigans ensue.

 

thanks for your help

 

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  

×