• 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.

Question!

Status
Not open for further replies.
Level 1
Joined
Jul 10, 2005
Messages
4
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
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
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
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
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
 
Level 2
Joined
Jan 27, 2005
Messages
7
can't you just use the Player Flag-Turn On Bounty for player X action in map initialization?
 
Status
Not open for further replies.
Top