• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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,219
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