Hey, ive been working on a hero arena map, and ive been trying to create a script so that when a hero dies, he loses half of his gold which is divided amongst the team of the player that killed the hero.
Heres what i have so far
Heres what i have so far
-
Events
- Unit - A unit Dies
- Conditions
- ((Triggering unit) is A Hero) Equal to True
-
Actions
-
Player Group - Pick every player in (All enemies of (Triggering player)) and do (actions)
-
-Loop - Actions
- Player - Add (((Triggering player)Current Gold)/10) to (Picked player)Current gold
- Player - Set (Triggering Player) Current gold to (((triggering player)Current gold)/2)
-
-Loop - Actions
-
Player Group - Pick every player in (All enemies of (Triggering player)) and do (actions)