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

Status
Not open for further replies.
Level 1
Joined
Oct 13, 2013
Messages
3
Hey guys,

I'm having trouble finding a solution to a certain problem. In the map I'm working on, I have these units that drop items from a global Item Table. However, the chance to get the items is not 100%. Therefore, you can kill all the units but still not get the item. That's why I made it so that once one of the units dies, after 30 seconds a new unit of the same type spawns.

Now, here's where I run into a problem: how do I get the spawned unit to also use the same item table it used before it was killed?

Any help?

Thanks in advance,

Wc3Owns
 
Level 1
Joined
Oct 13, 2013
Messages
3
Right. So, I should make the item drop by triggers. However, I'm not sure how to use a randomizer in triggering. To make the item drops at certain times and not drop at other times. So: how can I use the randomizer? I'm sorry, I'm not a triggering expert.

EDIT: About the JASS tutorial. I don't really want to work with JASS.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Item pools aren't interfacable in GUI.

What you have to do is basically

Event - Unit is killed
Conditions - Unit is equal to YourUnit
Actions -

If Random integer between 1 and 100 is less than or equal to your percent than
set temploc = position of yourunit
create one youritemtype at temploc
custom script: call removelocation(temploc)
endif
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Right. So, I should make the item drop by triggers. However, I'm not sure how to use a randomizer in triggering. To make the item drops at certain times and not drop at other times. So: how can I use the randomizer? I'm sorry, I'm not a triggering expert.

EDIT: About the JASS tutorial. I don't really want to work with JASS.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • -------- ^ Your Desired Unit. --> Condition --> Unit-Type Comparison --------
      • -------- ----------------------------------------------------------------------------------- --------
      • -------- Create ITE ( If Then Else ) => Condition => Real Comparison => Math Random Number, Comparison = Less than or equal to => Desired Percentage Chance. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random real number between 0.00 and 100.00) Less than or equal to 25.00
        • Then - Actions
          • -------- ----------------------------------------------------------------------------------- --------
          • -------- Your Desired Unit. Variable => Unit. --------
          • Set DesiredUnit = (Triggering unit)
          • -------- ----------------------------------------------------------------------------------- --------
          • -------- Your Unit's Location. Variable => Points. --------
          • Set MyLoc = (Position of (Desired_Unit))
          • -------- ----------------------------------------------------------------------------------- --------
          • -------- Creating Item. Create < YOUR_ITEM_TYPE > at < DESIRED_LOCATION or REGION > --------
          • Item - Create Tome of Experience at MyLoc
          • -------- ----------------------------------------------------------------------------------- --------
          • -------- REMOVE LEAKS ALWAYS. --------
          • Custom script: call RemoveLocation ( udg_MyLoc )
          • -------- ----------------------------------------------------------------------------------- --------
        • Else - Actions
 
Status
Not open for further replies.
Top