Basically, I want to make a trigger that detects when a unit returns the gold that it gathered from a gold mine to it's base, so I can display a message and do a bunch of other stuff. How would I do this?
Set YourIntegerVariable = (Player 1 (Red) Current gold)
Trigger:
Events
Player - Player 1 (Red)'s Current gold becomes Greater than (Real((Player 1 (Red) Current gold)))
Conditions
Actions
Game - Display to (All players the text: (You have recieved + ((String(((Player 1 (Red) Current gold) - YourIntegerVariable))) + ( you now have + (String((Player 1 (Red) Current gold ))))))
Set YourIntegerVariable = (Player 1 (Red) Current gold)
The problem with that is, if the player kills a creep and gets the bounty from it, the trigger will also fire. I don't think there is a clean way to do what you want, unfortunately.
just put a some condition like an if then else.
if:
Dying unit is equal to (creepX)
Action - Then
Do nothing
Action - Else
The text message
Do not know if it will work, took it from the top of my head, but hopefully it will. maybe by making a different condition, checking if someone died if possible.
Also if you plan to have to many creeps:
A=The trigger u are asking for
Event:
A unit dies
Condition:
Dying unit equal to (CreepX)
Action:
Trigger - Turn off (A)
add 10 to P1 current gold
Trigger - Turn on (A)
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.