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

Removing Leaks Problem

Status
Not open for further replies.
Level 7
Joined
Jul 20, 2009
Messages
295
Hello,

I'm creating my own map atm and been having problems with the following leak removals:

  • Initialization Set up
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set TempPlayerGroup = (All players)
      • Player Group - Pick every player in TempPlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Disable Abolish Magic for (Picked player)
      • Custom script: call DestroyForce( udg_TempPlayerGroup ) ; <==PROBLEM NUMBER 1

and

  • Casting GFX
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = Casting_Group
      • Unit Group - Pick every unit in Casting_Group and do (Actions)
        • Loop - Actions
          • Set TempLocation = (Position of (Picked unit))
          • Special Effect - Create a special effect at TempLocation using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempLocation)
      • Custom script: call DestroyGroup(udg_TempGroup) ; <==PROBLEM NUMBER 2
Whenever I remove player leakage (via Custom Script), the first trigger in this example, the player somehow gets deleted from the game. For example, when I create a game message to all players, I am not able to see the message after this Custom Script, but before it runs, I am able to see the message.

As for the unit group leakage, if I try to remove the group, anything related to the group becomes unknown/deleted in the game. For example, the special effect appears once and that's it also 'Casting_Group' variable (Unit Group variable) becomes deleted as well, even though I'm deleting 'TempGroup'

May someone help me out as to why this happen and when to use such things and what's their purpose? I thought I had to use it for everytime there is 'Pick every player/unit' action.

Thank you.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
there custom scripts seems to be correct. I think you need to restard the editor + the computer.

edit: I maybe know why... I am not sure at the 2 tho
1. if you put the message after the group is removed it wont be displayed ofc
2. since you use tempgroup = cast_group why not use cast group directly insted?
 
Status
Not open for further replies.
Top