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

Creep Item Dropping {creeps no longer drop anything after re-spawning}

Status
Not open for further replies.
Level 3
Joined
Apr 7, 2009
Messages
25
As it is I am using custom item sets on units for their drops. But this only works the first time they die. After they respawn, the item set is erased, therefore they don't have a chance to drop anything.

Do I need to use a trigger to make sure the item drops stay with the creeps as they respawn?
 
Level 10
Joined
Mar 16, 2009
Messages
354
what is your exact spawning trigger?

EDIT: actually just use this trigger(keep your spawn trigger):

Event - Generic Unit Event - A unit dies

Condition - Unit Type Comparision - Dying unit is equal to your creep

Action - Item create the item you want at position of dying unit

for percent chance of getting certain items(create a variable, variable type integer no array and add these actions to your trigger)

Event - Generic Unit Event - A unit dies

Condition - Unit Type Comparision - Dying unit is equal to your creep

Action - General - Set variable - Set (the integer mentioned above) = to Math - Random Number (A random # set having the same number possiblities as you have items in the table)

Action - General - If/Then/Else -
If - Integer Comparision - (the integer mentioned above) = 1
Then - Item - Item Create - Create 1 (item 1) at point of dying unit
Else -I f/Then/Else -
If - Integer Comparision - (the integer mentioned above) = 2
Then - Item - Item Create - Create 1 (item 2) at point of dying unit
Else -I f/Then/Else -
If - Integer Comparision - (the integer mentioned above) = 3
Then - Item - Item Create - Create 1 (item 3) at point of dying unit
Else -I f/Then/Else -
If - Integer Comparision - (the integer mentioned above) = 4
Then - Item - Item Create - Create 1 (item 1) at point of dying unit
Else -Do nothing

this will give a 50% chance to get item 1 and a 25% chance to get item 2 and a 25% chance to get item 3
 
Level 3
Joined
Apr 7, 2009
Messages
25
Considering the ton of different units and item drops in my orpg, this will take a while to utilize properly. It looks like it should work, never thought of it in that sense. Thanks for the help!

+rep! :thumbs_up:
 
Status
Not open for further replies.
Top