Random Item Drop Help Please

IceWarrior98

New Member
Reaction score
12
I'm trying to make specific units drop a specific item table in my map but I can't figure out how to make them have this setting when created. I know how to do it to already placed units but I can't figure out the triggers. Can anybody help me?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
You'd have to set the units to a variable.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
> could you give me quick info on what I need to do?

No, because I don't know what your setup is. What units do you need to store? How are they created on the map? It would be best if you read a variable tutorial. :p
 

IceWarrior98

New Member
Reaction score
12
> could you give me quick info on what I need to do?

No, because I don't know what your setup is. What units do you need to store? How are they created on the map? It would be best if you read a variable tutorial. :p

Oh. Well, so far i'm working with one unit but I want it to have a chance to drop a certain item and a certain amount of them. I just fiddled with it a bit and got it to drop the item but I can't figure out percents. Could help with that or do I still gotta search for a tut? lol

Edit:

I figured it out! You don't need variables! Haha ^_^

Code:
Crystal Golems
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Crystal Golem
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 0 and 1) Equal to 0
            Then - Actions
                Item - Create Diamond at (Position of (Triggering unit))
                Item - Create Diamond at (Position of (Triggering unit))
            Else - Actions
                Do nothing

I'm modifying it to drop more items each at a random rate. So for every diamond dropped it's a 50% chance, other items work the same way aswell just instead of 0-1(50%) do 2-11(10%) or 0-10 if you want a chance to drop diamond AND something else. Take that variables!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top