Jump to content
Sign in to follow this  
-45Cdo-Kotp

Deleting Triggers

Recommended Posts

Hi , im currently at completion of a mission I have been making for a number of weeks and to try and tidy everything up I am enquiring whether it is possible to delete a trigger i have placed down on the map after it have been activated.

Basicly my mission has a large number of custom voice files that are played using a script called from a trigger becoming activated.

Obviously if someone Joins In Progress and we have passed through a number of these triggers they will automatically hear All the voices that have been played due when they spawn in.

So my question is basicly once a trigger has become activated and the script has been called to play the voices required, is it possible to delete the trigger and thus stop the sound files playing for new people that JIP ?

Share this post


Link to post
Share on other sites

Triggers are local to each machine: deleting a trigger on one machine will not do so for the rest.

I suggest using http://community.bistudio.com/wiki/addPublicVariableEventHandler instead: it fires only when a public variable is changed after the event handler is added. The downside is that it doesn't fire on the machine that updated the variable, so you'll have to script around that.

Share this post


Link to post
Share on other sites

Is this true, that deleting triggers with:

deleteVehicle triggername;

Doesnt delete the triggers for all players?

Share this post


Link to post
Share on other sites

Haven't checked this lately, but I have a note in my project about deleting triggers (automatically placed sound triggers on objects) that says that nearestObjects doesn't find triggers ("EmptyDetector"), but nearestObject does, but I settled on nearObjects. Also I don't give them names (which have to be unique), but I set the textfield instead. That way I won't be deleting any triggers that shouldn't be deleted (like mission triggers).

Share this post


Link to post
Share on other sites

Okay, that was good. It also seemed to work, but after reading this I got confused. But thanks for clearing it up.

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  

×