• 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.

Disableing trigger vs Destroying triggers

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
Have something difference between this two if in last line a setting trigger (where i just calculate/save something then never run anymore) destroy or disable in last line? or even worth to destroy 1-2 trigger or dont really change nothing?

call DisableTrigger( GetTriggeringTrigger() )
call DestroyTrigger( GetTriggeringTrigger() )
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Disabling it is useless since it won't trigger again anyway.

There isn't much benefit in destroying triggers unless you create them dynamically during the game.

what about the events, if i destroy a trigger then it is destroy with condition and action part or how it work?
i mean example to this http://www.hiveworkshop.com/forums/world-editor-help-zone-98/timers-230384/#post2293694

when we create event, for each unit or just event for each timer and since we cant remove the events i guess its stacking so not better if we dynamically create a trigger for each timer and when it is expire then destroy the trigger?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
DisableTrigger
Disables trigger from working.
Will work until EnableTrigger is called

DestroyTrigger
Destroys the trigger of course.
Can only be returned again once you do TriggerAddAction,RegisterEvent and TriggerAddCondition.And most important,CreateTrigger

i know how it work just i meant to memory useage because most of gui user disable the init triggers what run only once for avoid the twice trigger running coz of lagg but it is also destroyable whatever i am more curios now to most efficient way in this case http://www.hiveworkshop.com/forums/2297687-post3.html (what is similiar i guess at DDS too, where if i know well its add new unit event for trigger everytime)
 
Status
Not open for further replies.
Top