HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need info about DestoryTrigger()

01-20-2007, 07:08 PM#1
Ammorth
A while back, someone made a comment to avoid using destroy trigger. I know to know why this would be.

One of my systems in a map creates a trigger on the fly, and assigns it to a variable. When the trigger runs, it destroys itself at the end. Any problems with this?
01-20-2007, 07:14 PM#2
The_AwaKening
That makes no sense not to destroy it if you aren't using it anymore. You're freeing up the memory and eliminating and event.
01-20-2007, 07:37 PM#3
Captain Griffen
It can cause handle index mess-ups. Use search.
01-20-2007, 07:38 PM#4
Ammorth
I know, but someone said to try use other methods, instead of dynamically creating and destroying triggers.

Edit: Any known reason why it would cause handle index mess-ups, and how to avoid doing that? I did search, but nothing was stated as to why.
01-20-2007, 08:33 PM#5
Feroc1ty
Destroy the trigger if you aren't going to use it game anymore, such as initialization triggers. Other than that destroying it, and referring to the destroyed trigger may cause problems.