Can you add a Trigger to a Variable? I am looping through multiple "Any Unit Dies" events and I don't want certain Triggers to fire. Something like adding Picked Units to a Variable. Anything out there like that?
delete all the events of triggers that use event "any unit dies". you should for the most part will end up with a set of triggers with empty events. Now make a new trigger with Any unit dies, then in actions run each of the eventless triggers. Triggers that do not have waits should be placed at the top of the actions and they should have on the action "wait until complete". triggers with waits should be at the bottom with "Don't wait". this will improve performance. you can also functionize the triggers without events (that's basically what they are).
To further optimize you can throw if then elses into this master trigger based on the conditions of the death.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Can you add a Trigger to a Variable? I am looping through multiple "Any Unit Dies" events and I don't want certain Triggers to fire. Something like adding Picked Units to a Variable. Anything out there like that?
Unit Group variable type?
Member since 2010. Made the -The Thing- [Revival] game. Nostalgic of the WC3 days.
you centralize the events.
delete all the events of triggers that use event "any unit dies". you should for the most part will end up with a set of triggers with empty events. Now make a new trigger with Any unit dies, then in actions run each of the eventless triggers. Triggers that do not have waits should be placed at the top of the actions and they should have on the action "wait until complete". triggers with waits should be at the bottom with "Don't wait". this will improve performance. you can also functionize the triggers without events (that's basically what they are).
To further optimize you can throw if then elses into this master trigger based on the conditions of the death.