Kitt
New Member
- Reaction score
- 5
Here is my trigger code for some Goldmines that simply give you gold every second as long as you control them:
This works great for the first second. But, after that, nothing happens. The trigger refuses to give players gold. If you remove the last line (DestroyForce) the trigger works fine. It seems, that for whatever reason, DestroyForce is just completely removing my variable off the face of the earth...
I don't have the problem with the other leak management functions such as RemoveLocation or DestroyGroup. Am I doing something wrong? And if so, how should I stop that function from leaking, but still have it work?
Thanks in advance!
Meow.
Code:
ttGoldMine
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set Temp_PlayerGroup = (All players)
Player Group - Pick every player in Temp_PlayerGroup and do (Actions)
Loop - Actions
Player - Add (Number of living tu_Gold Mine units owned by (Picked player)) to (Picked player) Current gold
Custom script: call DestroyForce(udg_Temp_PlayerGroup)
This works great for the first second. But, after that, nothing happens. The trigger refuses to give players gold. If you remove the last line (DestroyForce) the trigger works fine. It seems, that for whatever reason, DestroyForce is just completely removing my variable off the face of the earth...
I don't have the problem with the other leak management functions such as RemoveLocation or DestroyGroup. Am I doing something wrong? And if so, how should I stop that function from leaking, but still have it work?
Thanks in advance!
Meow.