OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Safari on 12 Apr 2004, 18:11:33
-
how to active a trigger after another trigger has activated? I know something must be in the condition field, but couldn't find from faq's.
-
1st trigger:
cond: whatever
on act: trigg2=true
2nd trigger:
cond: trigg2
on act: whatever
:beat: *Gets Shot* :beat:
-
Thanks pal, it works :) My question was incomplete.. I would like the 2nd trigger activate after 1st has activated AND resistance units are present at the 2nd trigger. I can't make this happen for some reason.
I used your example and it activates the 2nd right after the 1sy and doesn't wait unit to be present. Sorry for not asking the right question right away :)
-
Set the 2nd trigger on Resistance-Present (I think you already did ;)) and for the example by the Real Armstrong use this condition :
trigg2 AND this
this is condition that's set on TRUE when all of the basic trigger conditions (etc Resistance-Present) are activated.
-
I assume that the feature AND does not work properly for ArmA, can it be?
I mean, it works inherently for me but at the begin of the mission there comes this error saying:
"Type object, expected Bool"
Do I have to do it different in ArmA?
PS:
(Should I better start a new topic at the ArmA-Section in such cases?)
-
and works fine, but each of the values needs to be a boolean. I assume that you named one of the triggers trigg2, since this would explain why and would complain about receiving an object (triggers are objects) rather than a boolean value in the condition. Using the variable name "trigger2Enabled" makes it clearer what it actually means. To be correct, you also need to initialise the value of trigger2Enabled in your init.sqs (or init.sqf) as false; in OFP or ArmA, having trigger2Enabled uninitialised (nil) will just make the trigger condition not work at all (it will be neither true or false) until it is defined, but in ArmA II it would raise an error.
trigger2Enabled = false;
1st trigger:
cond: whatever
on act: trigger2Enabled=true
2nd trigger:
cond: this and trigger2Enabled
on act: whatever