make item dissapear after x time

zzyzxroad

TH.net Regular
Reaction score
1
I want my gold dropped to dissapear after 22 seconds. with this trigger it only removes the LAST item created, not all of them.

Code:
LVL 6 Bonus
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to  Level 1
    Actions
        Set Random = (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Random Less than or equal to 20
            Then - Actions
                Item - Create Bonus Gold at (Position of (Dying unit))
                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Other\Levelup\LevelupCaster.mdl
                Wait 22.00 seconds
                [COLOR="Red"]Item - Remove (Last created item)[/COLOR]
            Else - Actions

How would I achieve all the gold to be removed?
 

DrEvil

FCRI Associate!
Reaction score
111
Set the item's custom value to 22

Keep periodic active all times
pick every unit matching gold coin type
set custom value = custom value - 1
if custom value = 0 remove picked item
 

zzyzxroad

TH.net Regular
Reaction score
1
hmm. seems a little complex. I tried Remove random item from map, and repeat it a few seconds later. It seems to work. So now you have to quickly pick up your gold, if not, then it will randomely disappear, then a few seconds more, more will disappear. I think it works good for me.

Thanks for your help.
 
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