- Joined
- Jul 20, 2009
- Messages
- 295
Hello,
I'm creating my own map atm and been having problems with the following leak removals:
and
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.
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)
-
Loop - Actions
- Custom script: call DestroyForce( udg_TempPlayerGroup ) ; <==PROBLEM NUMBER 1
-
Events
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)
-
Loop - Actions
- Custom script: call DestroyGroup(udg_TempGroup) ; <==PROBLEM NUMBER 2
-
Events
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.