DestroyTrigger()

uberfoop

~=Admiral Stukov=~
Reaction score
177
I've recently seen some discussion over in some other place regarding this native.

It DOES clean all events, conditions, actions attached to it, right?

*uberfoop looks fearfully forward, ready to burrow*
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Ever noticed that TriggerRegister<some>Event returns an event?
Same for TriggerAddAction/Condition, they also return the handle to what they added.

And you expect "destroy" to take care of this automatically?
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
Meh, I don't really know any languages except for JASS so I'm not totally sure how the system works.

I figured that it may destroy any events associated with an action. But yea, seeing as how it IS a type and can be used for several things at once, maybe im just stupid.

/brain a-splode
 

Daelin

Kelani Mage
Reaction score
172
Those functions return the objects incase you want to place multiple events on a trigger, and later remove one (or actually replace an event/condition depending on the circumstances).

~Daelin
 

SFilip

Gone but not forgotten
Reaction score
634
Simply put it does not destroy anything but the trigger itself...
Code:
               Events
             /
Some Trigger - Conditions
             \
               Actions
After running DestroyTrigger on Some Trigger this is what happens
Code:
               Events
             /
              - Conditions
             \
               Actions
The trigger itself is gone, but its events (actually not sure about this one, hopefully someone can confirm), conditions and actions stay around, floating unused somewhere in your memory...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top