• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

money drop

Status
Not open for further replies.
There's three fields in the object editor to define how much each unit can give:

(A) Stats - Gold Bounty Awarded - Base
(B) Stats - Gold Bounty Awarded - Number of Dice
(C) Stats - Gold Bounty Awarded - Sides per Die


Total: from (A+B) to (A+(B*C))

You have to enable bounty-giving for each player using a trigger:

  • Player - Turn Gives Bounty on for Player X
(this is Player - Turn Player Flag On/Off)
 
Last edited:
Level 16
Joined
Mar 3, 2006
Messages
1,564
There are many ways to do that.

1) Turning on Bounty:
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player - Turn Gives bounty On for PlayerX
2) If you want a percent chance of giving money there are 2 ways, either create a table that gives gold coin or by triggers, like this:

  • Money Drop
    • Events
      • Unit - A unit owned by Player 2 (Blue) Dies
    • Conditions
    • Actions
      • Set Chance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Chance Less than or equal to 30
        • Then - Actions
          • Item - Create Gold Coins at (Position of (Triggering unit))
        • Else - Actions
Change the number 30 to any number you want; that represents the chance of dropping
 
Status
Not open for further replies.
Top