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

Chance for a unit to drop items

Status
Not open for further replies.
Level 2
Joined
Jul 14, 2008
Messages
13
Hey, im making a RPG game and i am trying to do so it is 40% chance that a unit drops an item, can someone help me?
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
Go to the trigger editor,

create a Trigger:

Event:

A unit dies

Condition:

Creep of your choice == Dying unit

Action:

IF THEN ELSE

IF
Integer Comparisson => Random Integer Number from 1 to 10 Greater than 6

Then Do

Drop your Item

Greets!
 
Level 2
Joined
Jul 14, 2008
Messages
13
Go to the trigger editor,

create a Trigger:

Event:

A unit dies

Condition:

Creep of your choice == Dying unit

Action:

IF THEN ELSE

IF
Integer Comparisson => Random Integer Number from 1 to 10 Greater than 6

Then Do

Drop your Item

Greets!

thanks! :) yea i will

are you talking about 1 specie of creeps or 1 creep only?

im talking about two units, a murloc and a troll headhunter.

You can make this very specific. In one of my maps I had a roll of a random integer from 1 to 200 and set triggers like if less then 60 do nothing. if greater then 59 and less then 90 stuff like that. Play around with it.

ty :)
 
Last edited by a moderator:
  • Angry
Reactions: Rui
Status
Not open for further replies.
Top