Warcraft III resources & community, 2003–2006 · archived

Question!

6 posts
#1

Question!

I was wondering how to make it so when you kill an enemy, you get gold and it shows how much gold you got on the screen after you kill it.

So if I made it so you get 25 gold for killing an enemy, it would say +25...

Please help
#2
You mean.. this?

Events:
A Unit Dies

Conditions:
Dying Unit is equal to "the unit you want to give 25 gold, but if you want all units to give gold, don't use this condition"
Dying unit is in Units Owned by Player 1 (or whatever player you are) equal to false

Actions:
Add property: Add 25 to (Owner of Killing Unit))Current Gold
Game/Text message to player: Display to owner of Killing Unit at offset (0.00, 0.00, whatever) for 10 seconds (for example) the text: Your earned 25 gold for killing "name of your unit".


I hope this helps you. :wink: Sorry if it wasn't this what you meant.

-Rui
#3
Thank you that helped a lot :)
#4
The conditions are almost useless, but the second one is to prevent abusing, for example, if you are making a map where you spawn and kill units, players could abuse by just killing their own units, which would be lame. P.S I'm glad I helped. :)

-Rui
#5
can't you just use the Player Flag-Turn On Bounty for player X action in map initialization?
#6
It doesn't show text "+25" then...