Jump to content
Sign in to follow this  
JMOxx75

Multiple triggers sinc'd to a single Task state possible?

Recommended Posts

I have a task that gives 3 locations to eliminate insurgents. Each location has a BLUFOR present trigger with a variable "Arrivedlocationname" set to true and the other trigger is for OPFOR not present (this && ArrivedLocationName) sinc'd to the set task state module.

I have read on here that the triggers are fine from other examples but I couldn't find if it is possible to sinc multiple triggers to a single task state module to get a task completed?

Share this post


Link to post
Share on other sites

Make another trigger, put this into the condition, assuming you named the three OPFOR triggers "ClearedLocation1", 2, and 3:

((triggerActivated ClearedLocation1) && (triggerActivated ClearedLocation2) && (triggerActivated ClearedLocation3))

(replace "this" with this code)

Sync this new trigger to the task state instead. Basically this activates the trigger once all three locations are cleared. It's an easy workaround that should do exactly what you want.

Share this post


Link to post
Share on other sites

Yes, you can use multiple triggers for a single set task state module.

Source: Made small test task which requires the player to kill 3 units and then succeeds. Each unit got its own trigger because I couldn't get AND to work, might try && instead.

Code for trigger 1: !alive kill1;

Code for trigger 2: !alive kill2;

Code for trigger 3: !alive kill3;

Synchronize all triggers to your Set Task State (Succeeded) module. One thing to note, markers don't work with the task modules (not sure if they work with scripting).

You might be able to use just one trigger however with the code !alive kill1 && !avile kill2 && !alive3; I know you just wanted to know if you could use multiple triggers but I'm doing a Headhunters Revamp with 15 targets instead of 3 and you need to clear a beach before the target tasks will appear. Sync'ing 3 triggers with 15 tasks is not fun, and if you mess up you have to desync them all and do it again. But the answer to your original answer is yes.

Share this post


Link to post
Share on other sites

I made the Blufor trigger make a variable ArrivedatLocationName = true. I arrive (which spawns the insurgents) the variable is true in the debugger. The next trigger is the Opfor trigger set for not present. After I kill them it triggers. In this triggers on Act block I put: this && ArrivedLocationName. So if I am doing this correctly the Opfor trigger which I named ClearedLocation1 will only trigger once I arrive and no opfor are present right?

In the debugger under triggerActivation for ClearedLocation1 it says ["WEST", "present", false], the other 2 ClearedLocation1&2 say ["EAST", Not Present", false] (I havn't been to these yet). Is false the current state of the trigger? If so does false mean no trigger activation?

Share this post


Link to post
Share on other sites
I couldn't get AND to work, might try && instead.

{alive _x} count [kill1, kill2, kill3] == 0

Edited by cobra4v320

Share this post


Link to post
Share on other sites

I kept the trigger setup but instead of testing for triggerActivated with trigger name I instead went back into my triggers that I named ClearedPositionX and in the on Act block created the variable ClearedPositionX and then tested for all 3 variables in the trigger linked to the task state module. All of them worked according to the debugger except one of them. I think there was an Opfor hiding somewhere and I couldn't clear the area. Is there a debug command to kill Opfor in a radius?

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  

×