• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Item Removal System

Status
Not open for further replies.
Level 25
Joined
Sep 26, 2009
Messages
2,377
  • Global Item Removing
    • Events
      • Time - Every 120.00 seconds of game time
    • Conditions
    • Actions
      • Item - Pick every item in (Playable map area) and do (Actions)
        • Loop - Actions
          • Item - Remove (Picked item)
This picks all items in map and removes them. It only picks items that are no ground, not those that are carried, so it is safe.
However I would use a more complicated system as this one has one big flaw - if it happens that there is a desired item on the ground (let's say you just killed some epic foe and he dropped it) and you're on your way to pick it up (or make space in your inventory to pick up that item) and it just so happens that the timer is up (= a few minutes have passed), then the item you want will disappear too, even though it is on ground for only a few seconds.
tl;dr
The trigger above does not differentiate between items, so it may remove item that just dropped from enemy and which you want.


A more complex, but better system would be one that handles all items and puts them on separate "timers" (well not exactly timers but more like iterations of general periodic event).
 
Level 1
Joined
Jun 13, 2008
Messages
132
Don't use every 120 seconds then remove item, this is very annoying my boy, instead set the item life to a certain ammount, like 60 hitpoints, then run a trigger every second every item in playable map area or specify the temp_region and afterwards reduce every picked item's health by 1, when they have 0 life points the item will be gone. Then create another trigger and set the item's health to 60 again if a hero gets the item to give it again 60 seconds if he decides to drop it later to do some arrangement.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Don't use every 120 seconds then remove item, this is very annoying my boy, instead set the item life to a certain ammount, like 60 hitpoints, then run a trigger every second every item in playable map area or specify the temp_region and afterwards reduce every picked item's health by 1, when they have 0 life points the item will be gone. Then create another trigger and set the item's health to 60 again if a hero gets the item to give it again 60 seconds if he decides to drop it later to do some arrangement.

This can be done this way but it does have its bugs. Some items don't have a life value so it would remove them.

You should also read the other posts as this was already described as a bad idea above.
 
Status
Not open for further replies.
Top