Jump to content
Sign in to follow this  
jackass888

trigger conditions

Recommended Posts

Hi

I cannot get trigger conditions to work, no matter how I try.

trigger1

condition: true

activation: execute1 = true

trigger2

condition: execute1 or execute1 == "true"

activation: dosomething...

Not working...

What am I doing wrong?

Share this post


Link to post
Share on other sites

Try to set the "execute1" variable to false on mission start. Either in a trigger with "execute1=false" in the onactiviation line, or in your init.sqs/sqf.

trigger2

condition: execute1 or execute1 == "true"

activation: dosomething...

must be:

trigger2

condition: execute1

activation: dosomething...

Share this post


Link to post
Share on other sites

execute1 or execute1 == "true" isn't a condition. It should be

execute1 || execute2

Or

!IsNil "execute1" || !IsNil "execute2"

Share this post


Link to post
Share on other sites

Thanks. But it is still not working. Btw im running latest OA beta... maybe something has changed. Ill add a mission file and the triggers from the mission file. In this example trigger3 is not activated. And also foreach isnt working either.

Mission: http://www.mediafire.com/?aopvpzrvkvyiudc

Mission triggers:

trigger1

interruptable=1;

age="UNKNOWN";

expCond="true";

expActiv="execute1=false;{_x setCaptive true; removeAllWeapons _x; doStop _x;} forEach units group capt";

trigger2

a=5;

b=5;

timeoutMin=5;

timeoutMid=5;

timeoutMax=5;

interruptable=1;

age="UNKNOWN";

text="exe";

name="execute1";

expCond="true";

expActiv="execute1=true;hintc ""execute1 should be true""";

trigger3

a=5;

b=5;

interruptable=1;

age="UNKNOWN";

expCond="!IsNil ""execute1"" || execute1";

expActiv="{_x setCaptive false; removeAllWeapons _x; doStop _x;} forEach units group capt;capt setcaptive false;hintc ""Execute1 executed""";

class Effects

Share this post


Link to post
Share on other sites

Here is how mine is set up, and works.

Trigger 1

Name: trig1

Condition: !alive p1 (to check if hostage is dead)

On Act: hint "Hostage is Dead, Mission Failed. Return to base."; trig1 = true

Trigger 2:

Name: dont need one

Condition trig1

On Act: whatever (for me, its a Lose, if hostage does, trigger 1 fires a hint message, than 5 secs later the second trigger fires a Lose)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×