• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Removing a trigger event ingame?

Status
Not open for further replies.
Level 7
Joined
Apr 27, 2008
Messages
94
In the trigger engine that I am working on, which includes an advanced form of line of sight and some other nifty things, I am adding trigger events that need a specific unit to trigger, (i.e. a [unit] takes damage, acquires a target, etc) but as the game goes on longer the list of events for certain triggers will get larger. So I was wondering if removing events, either by clearing all events from a trigger, or by removing certain events, is possible?
 
Level 4
Joined
Apr 25, 2008
Messages
75
You can add Events to Triggers using Actions but don't think you can remove.
Two alternatives I can think of would be:
a) Create multiple Triggers and turn them off when needed.
b) Use If/Then/Else functions in the triggers to check if the Triggering Unit/Player or whatever can still do whatever.
 
Level 7
Joined
Apr 27, 2008
Messages
94
Multiple triggers and turning them off/on is a very ugly way to do things... it would cut down on any delay this may cause but only so many times. On the if/then/else function... no. It doesn't address the possible issue, which is too many events on the same trigger. Thanks for trying though.
 
Level 4
Joined
Apr 16, 2009
Messages
85
You can't remove single events from a trigger but you CAN destroy the trigger and recreate all events still in use (but beware destroying triggers sometimes bugs) the best thing is too just live with the leak its not that bad after all or you clean the event by transferring them to a new trigger and destroy the old one like every 5 minutes or so - keeping the chance of bugs low
 
Status
Not open for further replies.
Top