OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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)
-
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).
-
thanx! ;)
-
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)
-
"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.
-
cheers
-
what exactly am i supposed to do......this doesn't make much sense?? Does the the trigger have to be realted to the group??
-
IS anyone gonna help or not????????
-
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....