Disable Trigger vs Destroy Trigger
Moderator: Cheaters
-
- Forum Spammer
- Posts: 510
- Joined: August 18th, 2012, 2:32 am
Disable Trigger vs Destroy Trigger
Actually, what's the difference? Which should I use? In which situation?
-
- Forum Addict
- Posts: 407
- Joined: February 25th, 2011, 3:16 am
- Location: Unknown
Re: Disable Trigger vs Destroy Trigger
With DisableTrigger, u can EnableTriggger with the same event u have used before.
With DestroyTrigger, u can create new trigger with new event only. with new event u can use the same event u used before, Remember create new trigger before.
With DestroyTrigger, u can create new trigger with new event only. with new event u can use the same event u used before, Remember create new trigger before.
-
- Forum Spammer
- Posts: 510
- Joined: August 18th, 2012, 2:32 am
-
- Forum Staff
- Posts: 1470
- Joined: November 3rd, 2010, 10:48 am
- Title: Best Player
- Location: Singapore
Re: Disable Trigger vs Destroy Trigger
The advantage is when you use DestroyTrigger, you create a new trigger for new event. This means that you should use DestroyTrigger when you know the trigger is only gonna be activated for a single time , or the final time that trigger is going to be used.
On the other hand DisableTrigger pauses the on-going trigger, and the trigger can still be reactivated by EnableTrigger. A trigger not destroyed is a leak. and this is my humble opinion.
On the other hand DisableTrigger pauses the on-going trigger, and the trigger can still be reactivated by EnableTrigger. A trigger not destroyed is a leak. and this is my humble opinion.
-
- Forum Spammer
- Posts: 510
- Joined: August 18th, 2012, 2:32 am
Re: Disable Trigger vs Destroy Trigger
for example DestroyTrigger should be used when is TriggerRegisterTimerEvent with periodic turned off, is it true?
-
- Forum Addict
- Posts: 407
- Joined: February 25th, 2011, 3:16 am
- Location: Unknown
Re: Disable Trigger vs Destroy Trigger
Ex: you have trigger ABC=CreateTrigger() and DestroyTrigger will set ABC=null