Jump to content
Sign in to follow this  
osprey10

Help needed with using triggers to enable support.

Recommended Posts

I would like to use a trigger to enable the use of support.

Ex: air taxi cannot be used until AA has be taken out.

I tried linking the trigger with the support modules but i was able call support without flipping the trigger. I could try to make the trigger spawn a new chopper and then add it to a support module, but that seems overly complicated and i'm not sure its possible.

Share this post


Link to post
Share on other sites

Make a trigger that only syncs the player(s) to the support requester once the AA has been destroyed using synchronizeObjectsAdd. Or another idea add an event handler for when the AA dies that does the same thing instead.

Share this post


Link to post
Share on other sites
Make a trigger that only syncs the player(s) to the support requester once the AA has been destroyed using . Or another idea add an event handler for when the AA dies that does the same thing instead.

I'm trying to do something similar and I am still having issues. I don't have any experience scripting is this something that can be created utilizing createTasks and triggers? If so, how?

Share this post


Link to post
Share on other sites

Although I can add the sync to the support module I can't see a way to un synch it.

Share this post


Link to post
Share on other sites
I'm trying to do something similar and I am still having issues. I don't have any experience scripting is this something that can be created utilizing createTasks and triggers? If so, how?

let take the AA example in the OP, could use the following in the AA's Init line.

this addEventHandler ["killed", {DEADBEEF synchronizeObjectsAdd [player];}]

Where DEADBEEF is the support requester and player is the unit you want to have support available to it.

Although I can add the sync to the support module I can't see a way to un synch it.

I had forgotten some details as to how the support system works. Sufficient to say un syncing the player from the requester isn't enough because some of the support scripts are running on the player.

What you can do instead is try simply deleting the support provider via a script. This does have one potential issue if you end up deleting it while another script is using it you may crash.

this addEventHandler ["killed", {deleteVehicle ART1;}]

Where ART1 is the support module you no longer want provided.

One final caveat if this is going to be used for a multilayer map there is a seperate event handler and it's standard practice to have these handlers run scripts instead of directly placing code inside them.

Do things like this:

this addMPEventHandler ["killed", {_this execVM "myscript.sqf";}]

Avoid things like this:

this addMPEventHandler ["killed", {deleteVehicle ART1;}]

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  

×