• 🏆 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!

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