How do you make units drop treasure?

Bananarama1

Member
Reaction score
3
Hey guys!

Im trying to make some of the creeps on my map drop treasure, but i can't seem to figure it out. I've made item sets, but i cant seem to link them to units.

Yes i have used the search tool and checked tutorials, and also checked google. :(
 

Happy

Well-Known Member
Reaction score
71
just make it triggered (i think its easier^^)

first make a item variable array with all dropable items and then trigger it...when a unit dies an if then else with an integer for the chance to drop and then create an iten[random number between 1 and X] at position of dying unit.

i hope it helps

greetz happy
 

Lord Regno

Active Member
Reaction score
19
Here are one, pick that you want from it:

Trigger:
  • Easy bandit
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Dying unit)) Equal to Bandit <-This is the unit that will drop the item
              • (Unit-type of (Dying unit)) Equal to Brigand
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 30) Less than or equal to 1 <- If you want to have a chance that it will drop
            • Then - Actions
              • Set temp_point = (Position of (Dying unit))
              • Item - Create Ring of Protection +2 at temp_point
              • Custom script: call RemoveLocation (udg_temp_point)
            • Else - Actions
        • Else - Actions
 

keeper77

New Member
Reaction score
3
Just to add something, if your units do not respawn, and there arn't a lot of them, you can double click on the unit once it is placed in editor, and set an item table to it, however, unlike the trigger above, you have to manually equip it to the units, and it will not work twice (only once) if the unit "respawns."
 
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