OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: seanver on 31 Oct 2002, 13:37:55

Title: setcombat mode and foreach thislist
Post by: seanver on 31 Oct 2002, 13:37:55
I'm trying to make all units in a trigger stop shooting once the enemy is starting to retreat. I know how to do that. But here's the problem.

I use this command to make them hold their fire:

"_x setcombatmode "BLUE"" foreach thislist

But the editor gives me an error:  Unkown operator BLUE.

If I don't put the " " between BLUE, it doesn't return an error but the command doesn't work, since it must be unit setcombatmode "BLUE"...

any ideas?
Title: Re:setcombat mode and foreach thislist
Post by: Bremmer on 31 Oct 2002, 14:18:04
Try this:

"_x setcombatmode ""BLUE""" foreach thislist

(Honest - it may look daft, but it works!  ::))

Or this:

blue = "blue"; "_x setcombatmode blue" foreach thislist

Cheers  :)
Title: Re:setcombat mode and foreach thislist
Post by: seanver on 31 Oct 2002, 14:28:22
Thanks m8