• 🏆 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!

Is that leaks?

Level 17
Joined
Jun 2, 2009
Messages
1,112
  • Pickup Items New
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer CorpseInteger1) from 1 to 10, do (Actions)
        • Loop - Actions
          • Custom script: if UnitHasCeset(udg_Hero[udg_CorpseInteger1]) and not UnitHasGhost(udg_Hero[udg_CorpseInteger1]) then
          • Custom script: call CheckNearbyCesets(udg_Hero[udg_CorpseInteger1])
          • Custom script: endif
I am not familiar with custom scripts. This trigger detects the corpes of the player. It works for the unit called ghost (you will teleport into town and turn into a ghost)
Is that trigger always runs?
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,456
UnitHasCeset(), UnitHasGhost(), and CheckNearbyCesets() are not Blizzard functions so we don't really know what they do. These were created by a User like you or me and can do just about anything.

You'll have to show us the code that contains those functions for us to know what they actually do. Then we can determine if they have memory leaks or not.

As of right now you're basically asking:
Does this trigger leak?
  • Events
    • Time - Every 0.50 seconds of game time
  • Conditions
  • Actions
    • For each (Integer CorpseInteger1) from 1 to 10, do (Actions)
      • Loop - Actions
        • Trigger - Run some other trigger
We don't know what the other trigger does so we can't tell you if it leaks or not.

But are you asking if it has memory leaks or if it always runs? Assuming your trigger is on by default then it will run once every 0.50 seconds for the entire game. A trigger/function can always run without issues, whether it has memory leaks in it or not is another story.
 
Last edited:
Top