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

Dice Rollin???

Status
Not open for further replies.
Level 3
Joined
Nov 3, 2006
Messages
23
Hi Guys :cidea: i want to make a trigger with something like "Dice Rollin". For example when a creep dies the WE chooses a random number betwenn 1-10 or 1-6 or whatever, and when it rolls a 1 or 2 it does nothing, 3 it drops certain item, 4 Drops Potion and so on... Can u help please?
 
Level 9
Joined
Oct 24, 2007
Messages
421
Try using the following actions

'set variable ''integer'' to ''math random number between'' 1 - number of events

' if ''integer equal to 'one event' then 'create 1 item of type ''item made'' at position of dying unit'
else do nothing

and use if then elses for each possible outcome
 
Status
Not open for further replies.
Top