Xebarsis
New Member
- Reaction score
- 7
In my game sometimes a unit called the "Runaway Gold Mine Cart" spawns. I want to make it so that every time you attack this unit, the attacking player gets 3 gold.
Unfortunately, I only know how to make it give the user gold when the gold mine cart is under attack. What I mean by this is that it's exploitable; you could pretend to attack the gold mine cart and then hit the stop button before the attack is finished and the trigger will still play.
Is there a way I can adjust this trigger to only give 3 gold and play the sound effect when the gold mine cart is actually damaged instead of simply attacked?
Unfortunately, I only know how to make it give the user gold when the gold mine cart is under attack. What I mean by this is that it's exploitable; you could pretend to attack the gold mine cart and then hit the stop button before the attack is finished and the trigger will still play.
Code:
Goldmine Cart Damage
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacked unit)) Equal to Gold Mine Cart
Actions
Player - Add 3 to (Owner of (Attacking unit)) Current gold
Sound - Play Coin <gen> at 100.00% volume, attached to (Attacked unit)
Is there a way I can adjust this trigger to only give 3 gold and play the sound effect when the gold mine cart is actually damaged instead of simply attacked?