I cant make units like Peasant give gold when they die.

l8rg8r

New Member
Reaction score
0
When i kill a "Peasant" i want it to give 1 gold but i can't figure out how to do it!
*Edit
okay well im making a TD, so basically when my tower kills a peasant i want it to give 1 gold.
 

BLQQD

New Member
Reaction score
2
can u be more specific? like when 1 player kills another players peasant, the killing player recieves 1 gold? that would be a simple trigger i think but id have to go play with it for an hour before i could give u sumthing to use XD
 

Guest3z

New Member
Reaction score
22
I believe your looking for bounties. To enable them use the action
Trigger:
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Player - Turn Gives bounty On for (Picked player)

at the start of the game/map initialization use this along with the "Stats - Gold Bounty Awarded - Base/Number of Dice/Sides per Die" fields in the object editor for each unit to give the gold you want them to give.
Hope this helps :thup:
 

Sneakster

Active Member
Reaction score
24
Well, I created an example of what I think you want.

Trigger:
  • Give Gold
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Peasant
        • Then - Actions
          • Player - Add 1 to (Owner of (Killing unit)) Current gold
        • Else - Actions


It just detects what type of unit dies and then gives 1 gold if it is a peasant.
 

White_Rook

New Member
Reaction score
1
That works too. but if you enable 'Gives Bounty' as Guest3z suggested you could edit the bounty values for each unit and then avoid creating triggers for each unit type.

In the stats for each unit you'd be looking for:

Stats - Gold Bounty Awarded - Base
Stats - Gold Bounty Awarded - Number of Dice
Stats - Gold Bounty Awarded - Sides Per Die

For such a specific value as 1 gold for a peasant you would put 'Base' as 1, and the others as 0
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top