OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: unkie on 13 Jun 2003, 11:18:39

Title: Foreachunits this (again)
Post by: unkie on 13 Jun 2003, 11:18:39
hi i was wondering, usually for a single guy you put this setbehaviour "safe" or 'this setcombatmode "blue"....is there a command for a whole group which can be used with these types of commands?  something similar to the "x_moveincargo foreachunits this" command...
Title: Re: Foreachunits this (again)
Post by: Chris Death on 13 Jun 2003, 13:05:05
hmm - most of it you figured out by yourself, so here's the
correct syntax for that:

"_x setbehaviour {SAVE}" foreach units this

~S~ CD
Title: Re: Foreachunits this (again)
Post by: LCD on 13 Jun 2003, 13:33:12
@ chris - not exactly u forgot somin - also it safe not save ;)

"_x setbehaviour {SAFE}" foreach units Group this

LCD OUT
Title: Re: Foreachunits this (again)
Post by: deaddog on 13 Jun 2003, 18:14:34
You don't have to set each units behaviour individually.

Use:  groupname setbehaviour "safe"

or

groupname setcombatmode "red"

or

(group unitname) setbehaviour "safe"

or if it is in the init line of a unit:

(group this) setbehaviour "safe"

 :)