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

Item Drop variable

Status
Not open for further replies.
Level 6
Joined
Dec 9, 2008
Messages
233
Hello... i have another problem with items..

I made trigger that respawns creeps (etc. Wolf) every 45 seconds after they die. Now, wanna make them have 75% chance to drop item ( etc. Wolf's Skin). I can make that for first one by item table, but when he revives, he won't have that table that i set him earlier 'cos it's another unit.... please help

I already know how to make Wolf drop that item every time he dies, but how to make it 70%??

where i can find that 'Random integer between 1-100'
-'If integer equal to, or greater than 75 then' ?? ------------> lol just found it tnx blooddancer
 
Level 12
Joined
Mar 16, 2006
Messages
992
Nah. Trigger it.

'A unit dies'

'Unit type of dying unit equal to Wolf'

'Random integer between 1-100'
-'If integer equal to, or greater than 75 then'
--'Create one Wolf Skin at position of dying unit'.

Be aware that this leaks.

Event: A unit dies
Condition: Unit type of (Dying Unit) equal to Wolf
Condition: (random integer between 0-100) is less than (drop rate%)
Actions:
set point = position of (dying unit)
create item = wolf skin at point
call destroyLocation( udg_point )


It's easy as hell to just edit the unit drop table itself and add your 'wolf skin' item to it at a 70% drop rate, though.
 
Status
Not open for further replies.
Top