HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need an anwnser! Simpe script,..

06-07-2006, 07:10 PM#1
Freakazoid
What does this do?

Trigger:
Run Costum Script - call DestroyTrigger(GetTriggeringTrigger())
Can this prevent lag?
06-07-2006, 07:15 PM#2
Rising_Dusk
Well I'm not sure why you're running it like a trigger.
Just this would work.

Trigger:
Untitled Trigger 001
Events
Conditions
Collapse Actions
Custom script: call DestroyTrigger(GetTriggeringTrigger())

But that destroys a trigger when it's run.
If a trigger is only ever run once (Like an initialization trigger) you can always destroy it for safe keeping. I've never noticed a significant difference in lag when I do or do not destroy that kind of trigger. However, if you have a spell that creates triggers, I DO recommend destroying them afterwards to prevent leaks and such.
06-07-2006, 10:26 PM#3
weaaddar
theres more to a trigger then itself. You need to make sure youdon't leak the triggeraction, and the trigggercondition. The event won't leak i believe.
06-07-2006, 10:53 PM#4
Vexorian
events are destroyed when you destroy the trigger.
06-08-2006, 02:38 AM#5
Soulprovider
Quote:
Originally Posted by Rising_Dusk
However, if you have a spell that creates triggers, I DO recommend destroying them afterwards to prevent leaks and such.

Wouldn't that prevent the spell trigger from ever being cast again.
It should never be used for recurring triggers, only triggers that will be used once.
06-08-2006, 02:59 AM#6
Vexorian
Quote:
However, if you have a spell that creates triggers, I DO recommend destroying them afterwards to prevent leaks and such.
.
06-10-2006, 08:42 AM#7
Freakazoid
Thank you.