(making spawned units drop) Item Tables

Level 4
Joined
Aug 3, 2008
Messages
58
are you saying any unit of that type drops the item? if so do this...
event-unit dies
condition-unit type of "dying unit" = "your unit type that you want to drop item"
action-create item at position of dying unit ^.^

mmm reputation..
 
Level 7
Joined
Mar 23, 2007
Messages
302
Event:
Whenever a Unit dies

Condition:
(up to u)

Event:
Set X to Random number between 1 and 10
(.IF THEN ELSE stuff,)

If X = less or equal 3
THEN create Item1 at unit position
ELSE
IF X = greater than 3 AND less or equal 7
THEN create Item2 at unit position
ELSE
...

and so on

Here we have a 30% chance on Item1 and a
40% chance to get Item2, if u let it like this we
do have even a 30% chance to get nothing because
of the 8,9 and 10 that are not specified here.

At the conditions, u can use a Unit type or a Specific Location
whatever your imagination allowes.

IMPORTANT NOTE:
Try to not use 'Waits' because this is not a local Trigger.
If i would be at home i would do this for u, but sry.
The problem is that if u use 'dying Unit' and between the
Start and the End another unit dies then there would be
2 items at the new dead unit and no item at the first died one.
But without Waits i dont think it would cause problems.

greeds Equal
 
Level 4
Joined
Aug 4, 2008
Messages
76
That can be done too...Or use conditions and variables for ur items and make the unit whenever it dies to drop and whenever one is spawned to gain them ^^(Correct me if I'm wrong :X)
 
Well unfortunately I have yet to find
  • Unit - add item table to created unit or something like that
and that is the whole problem

Guess I will go it like you said

  • Items
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set ItemRoll = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ItemRoll Greater than or equal to 1
          • ItemRoll Less than 61
        • Then - Actions
          • Do nothing
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ItemRoll Greater than 61
          • ItemRoll Less than or equal to 65
        • Then - Actions
          • Item - Create (Random level -1 Artifact item-type) at (Position of (Dying unit))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ItemRoll Greater than 65
          • ItemRoll Less than or equal to 73
        • Then - Actions
          • Item - Create (Random level -1 Miscellaneous item-type) at (Position of (Dying unit))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ItemRoll Greater than 73
          • ItemRoll Less than or equal to 81
        • Then - Actions
          • Item - Create (Random level -1 Any Class item-type) at (Position of (Dying unit))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ItemRoll Greater than 81
          • ItemRoll Less than or equal to 93
        • Then - Actions
          • Item - Create (Random level -1 Powerup item-type) at (Position of (Dying unit))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ItemRoll Greater than 93
          • ItemRoll Less than or equal to 100
        • Then - Actions
          • Item - Create (Random level -1 Charged item-type) at (Position of (Dying unit))
        • Else - Actions
 
Top