I need help with making a trigger that makes you lose gold (specifically 20%) when your hero dies. This is my trigger so far, but it's not working.
-
Death Town
-
Events
- Unit - A unit Dies
-
Conditions
- ((Triggering unit) is A Hero) Equal to True
- (Owner of (Triggering unit)) Not equal to Player 7 (Green)
-
Actions
- Set TempUnleakerLoc = (Position of (Dying unit))
- Floating Text - Create floating text that reads (- + (String((((Owner of (Dying unit)) Current gold) x (1 / 5))))) at TempUnleakerLoc with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
- Custom script: call RemoveLocation (udg_TempUnleakerLoc)
- Wait 3.00 seconds
- Floating Text - Destroy (Last created floating text)
- Wait 2.00 seconds
- Hero - Instantly revive (Triggering unit) at (Center of Hero Spawn <gen>), Show revival graphics
- Player - Add ((((Owner of (Dying unit)) Current gold) x (1 / 5)) x -1) to (Owner of (Dying unit)) Current gold
-
Events