Moderator
M
Moderator
Maker, 25th Aug 2011, Item Cleanup 1.2
Very useful for getting rid of used tomes for example.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
(13 ratings)
Approved
Item Cleanup

Events


Time - Every 15.00 seconds of game time

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




ItemsToClean Greater than 0



Then - Actions




-------- Loop through all dead items and remove them --------




-------- This happens at the absolute soonest at 30 seconds of game time (if there were items to remove at the 15 second mark) --------




For each (Integer Loop) from 0 to (ItemsToClean - 1), do (Actions)





Loop - Actions






Item - Set life of CleanedItem[Loop] to 1.00






Item - Remove CleanedItem[Loop]






Set CleanedItem[Loop] = No item




Set ItemsToClean = 0



Else - Actions


-------- --------


-------- Pick up all dead items and flag them as ready to remove --------


-------- --------


Item - Pick every item in (Playable map area) and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Current life of (Picked item)) Equal to 0.00





Then - Actions






Set CleanedItem[ItemsToClean] = (Picked item)






Set ItemsToClean = (ItemsToClean + 1)





Else - Actions
Maker, 25th Aug 2011, Item Cleanup 1.2
Very useful for getting rid of used tomes for example.
Removing Tomes Leak

Events


Unit - A unit Sells an item (from shop)

Conditions


*Any Tomes Type You Want*

Actions


Wait 0.00 seconds


Item - Remove (Sold Item)
PolledWait) which causes handle leaks and is generally an ugly thing to be avoided.You could just pick all items in map every so often n do a item life comparison... xD
How is that different from what I'm doing here?
Ehh you have custom script in there, don't really understand it. Lol (Fail)
defskull said:Wait, if Bribe is upload his own system who would certify his system to be approved or not ?
Maker ?
Ohhh the irony, haha.Him or The_Reborn_Devil. Moderaters can not moderate their own stuff thankfully.
Item - Remove CleanedItem[Loop]
Set CleanedItem[Loop] = No item
Item - Set life of CleanedItem[Loop] to 1.00
Item - Remove CleanedItem[Loop]
Set CleanedItem[Loop] = No item
Hi guys i need 1 little help I need to clean up map from items every X sec if number of items or items of type on map are >= X how can I do it using trigger?
I do not remember well if item groups leaked or not but I fear that they leak and are not removable.
Remove Tomes

Events


Time - Every 3.33 seconds of game time

Conditions

Actions


-------- Used tomes' leftover corpses litter the ground... --------


-------- (This used to not be necessary in older versions of Warcraft.) --------


-------- Typical Blizzard breaking stuff... Now we have to clean up after them. --------


Item - Pick every item in (Playable map area) and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Current life of (Picked item)) Equal to 0.00





Then - Actions






Item - Set life of (Picked item) to 1.00






Item - Remove (Picked item)
This is great. I simplified it because hundreds of tomes get bought in my map each minute and the occasionally cut off animations don't matter as much to me.
Remove Tomes
Events
Time - Every 3.33 seconds of game time
Conditions
Actions
-------- Used tomes' leftover corpses litter the ground... --------
-------- (This used to not be necessary in older versions of Warcraft.) --------
-------- Typical Blizzard breaking stuff... Now we have to clean up after them. --------
Item - Pick every item in (Playable map area) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current life of (Picked item)) Equal to 0.00
Then - Actions
Item - Set life of (Picked item) to 1.00
Item - Remove (Picked item)
Those don’t stick around. Tomes were intentionally patched around 15-20 years ago to stick around permanently so as to leave an “indicator” to people exploring cleared creep camps on ladder as to what kind of item the opponent might’ve grabbed (it is why there is a death animation that is played when the fog of war unveils it).thanks for posting this.
are pawned items considered dead?
Sure, it’s fine to change the time in the event to any time you want. Every minute or two is probably fine, I think I mainly set it to be this frequent because I wanted to make sure that the demo didn’t keep people too long to see how it works.Thanks for info. Also, could I increase the periodic time to lessen the amount of triggers running? There are only a few powerups in this map but figured why not add this system.

