Spawn items with inventories

XDogg

New Member
Reaction score
0
I ment Spawn Units with Inventories!!! Doh

Hey im just wanting to know if its posible to make a unit spawn and have an inventory from the custom map table.

Example.

Every 60 secs

Unit Create "Box"

Set Inv for "Box"


I know it aint that simple or I woulnt be asking :)
 

Kuberr24

Well-Known Member
Reaction score
28
Nope you can't make non preplaced units use item tables like that.

However, this can be fixed by using triggers.

When you make a unit in trigger 1, add to trigger 2 the event "last created unit dies"

and in trigger 2 (which hasn't got any events when you make it) you make actions - create item XXXX at position of dying unit
 

XDogg

New Member
Reaction score
0
yea but the point of the custom table is that each item has a chance of appearing in the box... so this trigger wouldnt allow the random item to drop .. just specific :p hrrm.
 

Yoshii

New Member
Reaction score
74
yea but the point of the custom table is that each item has a chance of appearing in the box... so this trigger wouldnt allow the random item to drop .. just specific :p hrrm.
well you can always build the table via trigger
unit dies
random between 1 and 100
if random =1
item create X
if random =2
item create Y

etc
 

XDogg

New Member
Reaction score
0
eh was suppose to be a percentage.. maybe ill try that later, i could just make (1-5) = item x (6,7) = item y etc :p
 

Yoshii

New Member
Reaction score
74
eh was suppose to be a percentage.. maybe ill try that later, i could just make (1-5) = item x (6,7) = item y etc :p

it is percetage what I wrote; you dont need to set value for all number
if you random 1-10 and only set 2 and 5 to drop item they have 10% to drop from the enemy.Even if you set an item for all value thats still 10% of chance of dropping unless an item type has 2 number
 

XDogg

New Member
Reaction score
0
Ok so how does the random line appear in the trigger list? (How would I create it)
 

Yoshii

New Member
Reaction score
74
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Random integer number between 1 and 10) Equal to 1
    • Then - Actions
      • Item - Create Tome of Experience at (Position of (Triggering unit))
    • Else - Actions
 

XDogg

New Member
Reaction score
0
ok i got that part, thanks for quick response .. now im stumped on how to get it to

"Random between 1 and 10"
 

XDogg

New Member
Reaction score
0
oh like what you got above I have, I just thought you had to make it roll a 1-10

Doesnt it need an action to make the If? work. or does it automatically draw a number from 1-10 from what you have above.
 

Yoshii

New Member
Reaction score
74
oh like what you got above I have, I just thought you had to make it roll a 1-10

Doesnt it need an action to make the If? work. or does it automatically draw a number from 1-10 from what you have above.

the IF come from IF then else multiple action.
basically the trigger Will read "If unit dies then roll 1-10 if its 1 then create tome of EXP at position of dying unit"
 

XDogg

New Member
Reaction score
0
Trigger:
  • Respawn PowerUp Boxes
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Magic Blocker
    • Actions
      • If ((Random integer number between 1 and 20) Equal to 1) then do (Item - Create Tome of Experience at (Position of (Dying unit))) else do (Do nothing)


So if i want more numbers I add more "IF Then ELSE"? (Ex)

Trigger:
  • Respawn PowerUp Boxes
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Magic Blocker
    • Actions
      • If ((Random integer number between 1 and 20) Equal to 1) then do (Item - Create Tome of Experience at (Position of (Dying unit))) else do (Do nothing)
      • If ((Random integer number between 1 and 20) Equal to 2) then do (Item - Create Orb of Frost at (Position of (Dying unit))) else do (Do nothing)


Sorry should of pasted this earlier would of been easier to see.
 

Yoshii

New Member
Reaction score
74
no thats wrong it shoudl read
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Random integer number between 1 and 10) Equal to 0
    • Then - Actions
      • Do nothing
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 10) Equal to 1
        • Then - Actions
        • Else - Actions

notice where the 2nd IF is; what you wrote would /random 1-10 twice
edit: actually it look fine it looked weird cuz your not using multiple;)
edit2: its definitely wrong
 

XDogg

New Member
Reaction score
0
K think i got it

Trigger:
  • Respawn PowerUp Boxes
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Magic Blocker
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 10) Equal to 1
        • Then - Actions
          • Item - Create Tome of Experience at (Position of (Dying unit))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 10) Equal to 2
            • Then - Actions
              • Item - Create Orb of Frost at (Position of (Dying unit))
            • Else - Actions


Have to test after work :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top