• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Question!

Status
Not open for further replies.

Switch.Blad3

S

Switch.Blad3

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
 
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
 
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
 
can't you just use the Player Flag-Turn On Bounty for player X action in map initialization?
 
Status
Not open for further replies.
Back
Top