I need help to fix this trigger. I don't know anything about leaks but leakchecker told me this leaked cause of the position that is not in a variable. So i wonder how to fix this, cause i tried and it didn't work.
-
Gold
-
Events
- Time - Every 0.50 seconds of game time
- Conditions
-
Actions
- Set regional_capitol[0] = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Region capitol))
-
Unit Group - Pick every unit in regional_capitol[0] and do (Actions)
-
Loop - Actions
- Set gold_horse[0] = (Units within 100.00 of (Position of (Picked unit)) matching ((Unit-type of (Matching unit)) Equal to Gold Horse))
-
Unit Group - Pick every unit in gold_horse[0] and do (Actions)
-
Loop - Actions
- Unit - Remove (Picked unit) from the game
- Unit Group - Remove all units of gold_horse[0] from gold_horse[0]
- Custom script: call DestroyGroup (udg_gold_horse[0])
- Player - Add 20 to (Owner of (Picked unit)) Current gold
-
Loop - Actions
- Unit Group - Remove all units of regional_capitol[0] from regional_capitol[0]
- Custom script: call DestroyGroup (udg_regional_capitol[0])
-
Loop - Actions
-
Events