• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Monsters with a chance to drop item(s)

Status
Not open for further replies.
Level 4
Joined
Jul 18, 2008
Messages
76
Hey guys, I've got an small problem that has to be fixed.
I have got 10 kobolds that spawns in an region every 30 seconds..

What I want is that all those kobolds will have a 5% drop chance of "gold coins"

Hopefully it is a simple question, so please answer me quick! :ugly:
 
  • Gold Drop
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Kobold
    • Actions
      • Set Point1 = (Position of (Dying unit))
      • Set Gold = (Random integer number between 1 and 100)
      • If (Gold Greater than or equal to 5) then do (Item - Create Gold Coins at Point1) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_Point1)
Variable types:
Point1 = Point
Gold = Integer

Point1 and custom script is only used to remove memory leak. You can learn about memory leaks in there and there.
 
Sheep, that gives you a 95% chance to drop gold. Change it to Less than or Equal to 5. :P
 
Status
Not open for further replies.
Back
Top