• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] call DestroyTrigger vs Turn Off

Status
Not open for further replies.
Level 12
Joined
May 7, 2008
Messages
330
So I've been thinking about this lately a bit too much, and I'm not sure what is the right decision.

Basically I have a lot of triggers in my map that get used only once and therefore I've been using call DestroyTrigger( GetTriggeringTrigger() to get rid of them.

However, I've also had some crashes (could be unrelated to this, but I'm not certain) and I have to rethink about using the call Destroy function in GUI.


My question would be:

Does the call DestroyTrigger( GetTriggeringTrigger() have any benefit over Turn off This trigger, in particular in the clearing / purging RAM?
 
Last edited:
Level 7
Joined
Sep 4, 2016
Messages
116
I can't say for sure either, but I do know it reduces the memory taken by the triggers during the match. This could make a difference if you have a significantly large amount of triggers you are destroying.

I imagine that if it is the cause of any of the crashes, it is because a trigger gets destroyed that another trigger is still dependent on. Someone with more experience with that action hopefully can verify or give additional insight.
 
Level 12
Joined
May 7, 2008
Messages
330
I can't say for sure either, but I do know it reduces the memory taken by the triggers during the match. This could make a difference if you have a significantly large amount of triggers you are destroying.

I imagine that if it is the cause of any of the crashes, it is because a trigger gets destroyed that another trigger is still dependent on. Someone with more experience with that action hopefully can verify or give additional insight.

Thanks.

Truth to be told some of the triggers I'm destroying are very minor so even if they weren't destroyed shouldn't use that much of RAM anyway.

Something like - set point / create unit / create fx / kill unit / remove fx / clear leak / etc.
 
Level 12
Joined
May 7, 2008
Messages
330
Found the solution and i wasn't the call Destroy, lol.

Ordering an artillery unit with an orb ability to attack-ground crashes the game.

I've ordered the Mortar Team to Attack Ground, and after 5 mins or so the game freezes for all players and crashes.

You think stuff like this would simply not work instead of crash things, but oh well.


Thanks for the help!
 
Status
Not open for further replies.
Top