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

[General] how to make units drop gold on death?

Status
Not open for further replies.
Level 2
Joined
Nov 21, 2010
Messages
29
Event: A Unit Dies

Condition: Dying Unit = (Type of Unit)

Action: Add X Gold to Owner of Killing Unit

This is the trigger you should use when you want every killed unit to give the same amount of gold. It can be done with the other way (which I'll post below here) but this is the easier version if you want everything to give the same amount of gold anyway.

If you want multiple units to give different amounts of bounty, go to the Object Editor, select the unit(s) you want to have bounty and look for the field Stats - Gold Bounty Awarded - Base and set this to whatever you want. There is also the option for a random amount of bounty between 2 numbers, the Number of Dice and Sides of Die below the Base work the same way as the damage dice works, with the difference that you can actually leave them at zero and the bounty still works (if you leave the damage dice and sides on 0 the unit can't attack).

After that, go to the Initalization trigger and add the line:
  • Player - Turn Gives bounty On for Player X
Ofcourse replacing x by the player you want to give bounty on kills. Just repeat this line for all the players that need to give bounty.

Hope this helped!
 
Status
Not open for further replies.
Top