HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger actions

01-30-2010, 04:56 AM#1
Ammorth
I just want to clarify something quickly. Does destroying a trigger remove the events registered to it (so they don't leak). I'm looking at using an attack detect system, but for a TD. So that means with 120 units a level, with 40 levels, im looking at 1200 units with events. Now, I am thinking to just destroy and re-create the trigger after every wave, but does that actually remove the event from memory or no?
01-30-2010, 06:16 AM#2
Themerion
Well, that's how Captain Griffen's light leakless damage detect work. So, yeah.
01-30-2010, 06:38 AM#3
Ammorth
Awesome. Thats what I was looking for.

Alright, so looking into the stack corruption. As long as I don't have any threads spawned from the trigger running, when I dump it, I should be fine. Correct?
01-30-2010, 07:26 PM#4
Anitarf
Quote:
Originally Posted by Ammorth
Awesome. Thats what I was looking for.

Alright, so looking into the stack corruption. As long as I don't have any threads spawned from the trigger running, when I dump it, I should be fine. Correct?
That is what is believed. That is why LLDD and DamageEvent destroy their trigger with a delay instead of immediately when they remake them.
01-30-2010, 08:55 PM#5
Ammorth
Quote:
Originally Posted by Anitarf
That is what is believed. That is why LLDD and DamageEvent destroy their trigger with a delay instead of immediately when they remake them.

Alright. I plan to destroy the trigger right before the next wave, instead of when the wave ends. That leaves me with a good 30 seconds for anything funky to settle down. As well, since the code will be specific to my map, I don't have to worry about adding a 10 minute fail-safe, as I will be the only one using it. I will still watch out for the stack corruption though, incase its cause is something more abstract.