Jump to content
Sign in to follow this  
Sc@tterbrain

Trigger un-happy

Recommended Posts

Premise:

Base fulla baddies, kill the officer.

One trigger is set to unleash hell if Blufor is detected upon their approach.

The other is set to do the same once the officer is killed.

My problem is having the either or situation. I can link the same units to both triggers, but that still requires that they both be true.

How do I get it so when one is activated, the other is no longer valid...or null or something?

Couldn't find this addressed anywhere, thanks for any input. notworthy.gif

Share this post


Link to post
Share on other sites

The first trigger

Condition: this and not var1

onactivation: var2=true

The second trigger

Condition: this and not var2

onactivation: var1=true

If it doesnt work try putting brackets around the not var# part like this: (not var1)

Share this post


Link to post
Share on other sites

edit: Unknowns way is probably better, but ill leave my post up wink_o.gif

i would put in the ON ACT line the commands that change the triggers settings.

for trigger 1 (named "detected") put something like this in the ON ACT:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

ofcdead settriggerstatements ["","",""]; ofcdead settriggertype "none"; ofcdead settriggeractivation ["none","west",true]

for trigger 2 (named "ofcdead") put this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

detected settriggerstatements ["","",""]; detected settriggertype "none"; detected settriggeractivation ["none","west",true]

another way would to use variables which would probably be easier, but im not too sure how to do it.

i think you would need 3 triggers. one to check the detected area, one to check if the officer is dead, and the last to set the stuff in motion.

after that it gets a little fuzzy for me. i think you need to put in your INIT.SQS something like this:

ofcdead=false

detected=false

then in the detected trigger's ON ACT you put detected=true

do the same for the other trigger but put ofcdead=true

then in the third trigger put in the CONDITION line this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

detected=true OR ofcdead=true

Share this post


Link to post
Share on other sites

Thanks for the recomendations. Unfortunately I'm still having some problems getting it working.

So far I have only tried theunknown's way, but I may have to try smoke's if I can't get it working.

In one trigger I have:

Condition: !(Alive hos1) and this and (not var1)

onactivation: var2=true

The second trigger:

Condition: this and (not var2)

onactivation: var1=true

Dosen't seem to be working, but it may be because of they way I have the triggers linked to the units. Right now I have both triggers linked to the units first move order. This of course works with each trigger attached individually, but not with both.

Any input appreciated.

Share this post


Link to post
Share on other sites

In your BLUFOR detected trigger use this condition:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this || !(alive Officer)

Or whatever you named your officer. Couldn't get any simpler.

Share this post


Link to post
Share on other sites
In your BLUFOR detected trigger use this condition:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this || !(alive Officer)

Or whatever you named your officer. Couldn't get any simpler.

And that will fix the problem with the 2 triggers?

My issue is not with the trigger recognizing the dead officer, that works fine. The problem is having the option of 2 triggers and setting one off.  (This or that u see.)

Share this post


Link to post
Share on other sites

Maybe if you use "deleteVehicle" on the other trigger when condition for other is met?

Share this post


Link to post
Share on other sites

I just made a test setup.

what I did I set up the triggers as before, but I added another trigger.

the 3e trigger is linked to the waypoints of the units.

3e trigger

condition:Var1 or Var2

Onactivation:

I did add a gamelogic that set the var's to false but i dont tink its needed.

Gamelogic

Initfield:Var1=false;Var2=false

basicly the 3e trigger gets activated by one of the other triggers, so your linking problem is solved.

Share this post


Link to post
Share on other sites
In your BLUFOR detected trigger use this condition:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this || !(alive Officer)

Or whatever you named your officer. Couldn't get any simpler.

And that will fix the problem with the 2 triggers?

My issue is not with the trigger recognizing the dead officer, that works fine. The problem is having the option of 2 triggers and setting one off.  (This or that u see.)

Indeed, why use 2 triggers when you only need one? You can use a single trigger to detect if one of two conditions have been met, triggers aren't limited to just a single condition you know.

Share this post


Link to post
Share on other sites
In your BLUFOR detected trigger use this condition:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this || !(alive Officer)

Or whatever you named your officer. Couldn't get any simpler.

And that will fix the problem with the 2 triggers?

My issue is not with the trigger recognizing the dead officer, that works fine. The problem is having the option of 2 triggers and setting one off.  (This or that u see.)

Indeed, why use 2 triggers when you only need one? You can use a single trigger to detect if one of two conditions have been met, triggers aren't limited to just a single condition you know.

Forgive me, I may have been a bit too tired and burnt out when I read your first post.  I just seemed to miss that was what you were getting at.  

Apparently Longbow194 posted almost the same question at almost the same time as I did.  Thanks all for the help.

Special thanks to Kyle and fasad for having patience with amatures like me, its apprecaited.

Heres a link to the other thread for those searching this later.

Activating a Trigger with a trigger

On it fasad posted this:

If you just want either of the two conditions to set off some reinforcements arriving, you'll only need one trigger.

Set it to <playerSide> detected by <enemySide>.

and in the condition box: "this OR !(alive officerName)"

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  

×