OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Leapingninja on 14 Jan 2005, 23:33:52
-
Hi guy's. Is it possable to trigger a trigger with a trigger? If you can would you please help me? i need it for a mission i'm makeing. Thanks
-
Trigger a trigger with a trigger? Why not just put all the elements you want activated in the same trigger? Do you mean arm a trigger with another trigger in that one trigger cannot be armed until another one is tripped?
Just not following the question ???.
-Air
-
Hey LeapingNinja,
to do what you want here is a simple explanation:
trigger#1 (the triggering trigger)
activated by whatever
condition:this
activation field: shotgun = true
Trigger#2 (the action bit)
activated by: set to nothing
condition: shotgun
activation field: whatever it is you want to happen
*******************************
So you stated that the variable/boolean "shotgun" was true in the first trigger so the second trigger fired once shotgun = true.
Hope it helps. 8)
-
GRK is right. A couple more worked examples might help:
I find this sort of thing useful when de-bugging a mission or a script.
Trigger 1:
condition field: true
activation field: report = true
Trigger 2: (repeating)
condition field: report
activation field: player sidechat format["%1",somethingIwanttomonitor];report = false
Trigger 3: (repeating)
min, max & mid: 2
condition field: not report
activation field:report = true
Then every 2 seconds I get a message reporting on the status of what I am monitoring
That is an example of a trigger causing a trigger to fire. Sometime you might want a trigger to be un-enabled until a certain condition has occurred. You don't want it to fire then, but you just don't want it to be active until then. In that case:
Trigger 1:
condition: true
activation: enableTrigger = false
Trigger 2:
condition: whateverConditionYouWant
activation: enableTrigger = true
Trigger 3:
condtion: this and enableTrigger
activation: whateverYouWantToHappen
You could also have a trigger that only fires before the condition is true and never afterwards:
Trigger 4:
condition: this and not enableTrigger
activation: whateverYouWantToHappen2
Note that without Trigger 1, Trigger 4 will not work.