OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: kingneb on 20 Apr 2003, 21:24:49

Title: doStop command, undoing
Post by: kingneb on 20 Apr 2003, 21:24:49


- Here is my current situation, I have 2 triggers.  When the mission begins, A tank crew has the DoStop command to hold them in place, in a line. I set up another trigger synchronized with a GET IN waypoint to tell the crew to get into the tank if it spots an enemy.  However, the DoStop command prevents this from happening.  What command do you use to cancel the state of the crew being stopped.  The DoMove or CommandMove commands don't work because they just tell the crew to go to a position (cordinates), not to follow a waypoint. How do I get around this?
 
                                                                      I thank anyone who can assist.
Title: Re:unit arrays
Post by: jojojoni on 20 Apr 2003, 21:50:29
An example:

not alive [unitname1,unitname2,...]

I have never used arrays with ALIVE command, but as far as i know it should work. If array donÂ't work with ALIVE command you could also use FOREACH function.
Title: Re:unit arrays
Post by: Bremmer on 20 Apr 2003, 21:55:13
Hello Kingneb

I think you need to use the count command, like this:

"alive _x" count unitarray == 0

Cheers
Title: Re:doStop command, undoing
Post by: UberKreb on 20 Apr 2003, 23:42:13
I had a problem with this sort of thing before.  Try using the stop command: unit stop true to get the units to stop and use unit stop false to get them moving again.  The only drawback to this method is that the stop command disables most of the AI.  The result is a stopped unit that can resume movement again, but won't fire at enemies until it moves.  I'm pretty sure it's impossible to get units using dostop and commandstop to move again.  Hope this helps.

UberKreb
Title: Re:doStop command, undoing
Post by: Sui on 21 Apr 2003, 02:34:20
Heya, Kingneb ;)

The opposite of the dostop command is dofollow. So you're looking at something like this:

unit dofollow (leader unit)

Which will make unit follow it's waypoints again. If you have a group of guys, use:

"_x dofollow (leader _x)" foreach (units group)

I tend to use the dostop/dofollow combination, as UberKreb points out, stop true/false tends to have adverse effects on the unit's AI ;)