OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: dmakatra on 11 Nov 2002, 19:12:30
-
"Learn about type switch triggers, its worth it. It means that your patrols can do one thing until the enemy is spotted and then they do something else.It avoids the absurdity - all too common - of guards wandering around in safe mode at one end of the village while their buddies are being shot to pieces at the other end."
This is taken from the "how to make good missions" tutorial in the "getting started" section. Well IÂ'm not really a pro, and I have never even looked at the switch trigger.
"of guards wandering around in safe mode at one end of the village while their buddies are being shot to pieces at the other end." I really hate to say this but most of my missions are like this, so can anyone explain how to use the switch triggers to me?
thx in advance
-
In a short way:
A switch trigger has to be used the same way as usual
triggers (conditions, activation fields, syncronizing, etc.)
The only difference to the usual trigger is:
The switch trigger forces events to be happening imidiately.
This means:
If you syncronize a switch trigger with let's say the 5th waypoint of a unit, the unit will move imidiately to the next
waypoint after wp nr. 5, regardless to where it actually is
(even if the unit is already at a waypoint further in the row
e.g: wp nr. 8)
By using switch triggers, you can also break never ending
waypoints, like: cycle, guard, support, hold
Switch triggers are also very helpful, if you want to create
different seperate sets of waypoints for a unit.
e.g: wp 1 - 5 (while 5 is a type cycle wp)
wp 6 - 8 (8 = hold wp)
wp 9 - 10 (10 = guard)
wp 11 (cycle, placed close to wp 1)
If you syncronize wp 5, 8, 10 with 3 different switch triggers
(depending on which event you want to be happened), you
have 3 different kinds of waypoint sets now.
wp 1 -5 - could for example be used as a usual patrol from
1 to 5 and again and again, until 1 of the triggers becomes
activated.
WP could be used in this case as a hold and defend the base waypoint set.
WP 9-10 as a set of sending them on a hunt for the enemies
hope this helps a bit, and doesn't confuse you even more ;)
~S~ CD
-
no probs matey. i asked a similar question recently. i cant remember right now who answered it, ill give credit when i find out.
Trigger 1:
Create a trigger that is big enough to contain al the east forces
Activation by : WEST
Activation type : Detected by EAST
Repeating : Yes
Condition : this
On Activation : AlarmEast = true
Trigger 2:
Create a trigger that is big enough to contain al the east forces
Activation by : EAST
Activation type : Present
Repeating : Yes
Condition : AlarmEast
On Activation : cmode ="COMBAT"; "_x setBehaviour cmode" forEach thislist
Trigger 3:
Create a trigger that is big enough to contain al the east forces
Activation by : None
Activation type : ---
Repeating : Yes
Condition : AlarmEast
Time min : 25
Time mid : 35
Time max : 45
On Activation : AlarmEast = false
Trigger 4:
Create a trigger that is big enough to contain al the east forces
Activation by : EAST
Activation type : Present
Repeating : Yes
Condition : !AlarmEast
On Activation : smode ="SAFE"; "_x setBehaviour smode" forEach thislist
This is what I use to change behaviour of my guards or troops, this is done by BIS in the same way, see mission stealing the documents 1985 campaign
--
*edit* That solution was given to me by Ottie. no, it doesnt use switches, but does the job nicely. Chris Death gave a good explaination, this here is an easier alternative!
Dave
-
thx guys
-
IÂ'm not really good at switch triggers yet, but I did make a soldier skip a cycle, go to a guard WP, skip the guard and walk to a move and then shoot at a civilian. thx again.
Topic solved and locked.