HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Removing an Event?

04-12-2006, 12:46 PM#1
Fulla
I have a trigger based spell which works by adding an event to another trigger the problem is every time the spell is cast it adds the event agian making the effect of the spell to happen twice/three times ect. is there anyway to remove an event from a trigger?
04-12-2006, 01:23 PM#2
Captain Griffen
You could have a unit group, and them to it as you add them as events, so you don't duplicate events.
04-12-2006, 01:45 PM#3
vile
Not only will it run over and over, it also leaks a trigger since it is never destroyed.

You have to do it with jass
04-12-2006, 02:40 PM#4
Chuckle_Brother
Yeah, you need to save and destroy:

the trigger -- call DestroyTrigger(SOMETRIGGER)
the actions -- call TriggerRemoveAction(SOMETRIGGER,SOMEACTION)
the conditions(I think) -- call TriggerRemoveCondition(SOMETRIGGER,SOMECONDITION)
04-12-2006, 04:12 PM#5
blu_da_noob
It may help if you explain why you need the trigger/how the spell works. Also, if a trigger is indeed required, dynamic creation/destruction of the trigger it the best way to go.