OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: thepandaman on 28 Dec 2002, 17:45:46

Title: getting guys to stand up & shoot
Post by: thepandaman on 28 Dec 2002, 17:45:46
 ???
On my single player mission so far i've got a bunch of soldiers calmly sitting round a fire, then an officer runs up, shouts out that the base is under attack, and i want my guys to stand up, and go into combat made at that point, how do I do it?
(by the way i'm a real beginner with script)
Title: Re:getting guys to stand up & shoot
Post by: toadeater on 29 Dec 2002, 09:12:18
You won't need a script for this. Create a trigger covering the area with whatever condition you want to activate it, like "West Detected By East", then in On Activation put:

"_x setbehaviour combat" foreach units thislist; "_x setcombatmode red" foreach units thislist

Behaviour is one of: "CARELESS", "SAFE", "AWARE", "COMBAT", "STEALTH".

Mode may be one of: "BLUE" (Never fire), "GREEN" (Hold fire - defend only), "WHITE" (Hold fire, engage at will), "YELLOW" (Fire at will), "RED" (Fire at will, engage at will).

Title: Re:getting guys to stand up & shoot
Post by: thepandaman on 29 Dec 2002, 11:48:16
thanx!  ;)
Title: Re:getting guys to stand up & shoot
Post by: Stupid Ugly Llama on 29 Dec 2002, 20:38:35
but isn't there a way of making the guy run up a trigger himself??  how do i do that??

(I too am a real, real beginner)
Title: Re:getting guys to stand up & shoot
Post by: toadeater on 30 Dec 2002, 09:23:09
"Run up a trigger"? You mean have a specific unit activate it? Yeah, you can do that by naming the trigger then putting this in the trigger's condition line:

someguy in list triggername

Where "someguy" is the name you gave to the unit and "triggername" is the name you gave to the trigger.

Also set the trigger to activated by "anybody".

There are other ways to do it, but that's the way I've been doing it so far.
Title: Re:getting guys to stand up & shoot
Post by: Stupid Ugly Llama on 30 Dec 2002, 12:55:59
cheers
Title: Re:getting guys to stand up & shoot
Post by: thepandaman on 30 Dec 2002, 15:50:11
what exactly am i supposed to do......this doesn't make much sense??  Does the the trigger have to be realted to the group??
Title: Re:getting guys to stand up & shoot
Post by: Stupid Ugly Llama on 02 Jan 2003, 13:28:37
IS anyone gonna help or not????????
Title: Re:getting guys to stand up & shoot
Post by: hashmus on 02 Jan 2003, 19:23:33
what is it you want???
if you want ONE certain unit to activate the trigger you should:
-click the group-button (F2)
-draw a line between trigger and man...
then it should be the only guy to activate the trigger....