• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Simple Item Cleanup System v1.1 [GUI]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
- This system will clean your item on the ground right after it is dropped
- It will also clean items dropped by loot
- It is in GUI !


External Instructions
- Open World Editor - File - Preferences... - General Tab - Tick the Automatically create unknown variables while pasting trigger data
- Copy the Simple Item Cleanup System folder.
- Further instructions inside the IC Setup trigger.

Internal Instructions
- IC_Duration sets the duration on how long does the item stays on ground before it is removed.
- IC_UnitDrop sets the option whether item should be destroyed if dropped by unit (not loot).
- Use these action right after an item is created/dropped
  • Set IC_MaxIndex = (IC_MaxIndex + 1)
  • Set IC_Item[IC_MaxIndex] = (Last created item) OR (Item being manipulated) OR any other event-response
  • Trigger - Run IC Initiate <gen> (ignoring conditions)
Example:
  • IC Event Loot
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Item - Create Claws of Attack +15 at TempLoc
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Set IC_MaxIndex = (IC_MaxIndex + 1)
      • Set IC_Item[IC_MaxIndex] = (Last created item)
      • Trigger - Run IC Initiate <gen> (ignoring conditions)
NOTE: Does not work with Item Table (pre-set via World Editor), you must set the Item Drop via triggers.


  • IC Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- IC_DurationSetup sets the duration of the item to stay on ground before it gets removed --------
      • -------- DATA CONFIGURABLES --------
      • Set IC_DurationSetup = 5.00
      • -------- IC_UnitDrop sets the option whether should item be destroyed if it is dropped by unit (non-loot) --------
      • -------- MISC CONFIGURABLES --------
      • Set IC_UnitDrop = True
      • -------- END OF CONFIGURABLES --------
      • Set IC_Interval = 1.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IC_UnitDrop Equal to True
        • Then - Actions
        • Else - Actions
          • Trigger - Turn off IC Event Unit Drop <gen>
      • Trigger - Add to IC Loop <gen> the event (Time - Every IC_Interval seconds of game time)
  • IC Loop
    • Events
    • Conditions
    • Actions
      • For each (Integer IC_CurrentIndex) from 1 to IC_MaxIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IC_Duration[IC_CurrentIndex] Greater than 0.00
            • Then - Actions
              • Set IC_Duration[IC_CurrentIndex] = (IC_Duration[IC_CurrentIndex] - IC_Interval)
            • Else - Actions
              • 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
                      • (Picked item) Equal to IC_Item[IC_CurrentIndex]
                    • Then - Actions
                      • Item - Set life of IC_Item[IC_CurrentIndex] to 0.41
                      • Item - Remove IC_Item[IC_CurrentIndex]
                    • Else - Actions
              • Set IC_Duration[IC_CurrentIndex] = IC_Duration[IC_MaxIndex]
              • Set IC_Item[IC_CurrentIndex] = IC_Item[IC_MaxIndex]
              • Set IC_CurrentIndex = (IC_CurrentIndex - 1)
              • Set IC_MaxIndex = (IC_MaxIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • IC_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
  • IC Initiate
    • Events
    • Conditions
    • Actions
      • Set IC_Duration[IC_MaxIndex] = IC_DurationSetup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IC_MaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on IC Loop <gen>
        • Else - Actions
  • IC Event Unit Drop
    • Events
      • Unit - A unit Loses an item
    • Conditions
    • Actions
      • Set IC_MaxIndex = (IC_MaxIndex + 1)
      • Set IC_Item[IC_MaxIndex] = (Item being manipulated)
      • Trigger - Run IC Initiate <gen> (ignoring conditions)
  • IC Event Loot
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Item - Create Claws of Attack +15 at TempLoc
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Set IC_MaxIndex = (IC_MaxIndex + 1)
      • Set IC_Item[IC_MaxIndex] = (Last created item)
      • Trigger - Run IC Initiate <gen> (ignoring conditions)
Magtheridon - Set Item Life before removing it
Kingz - Changed the interval to more less burden and more logic


v1.0
- Initial release

v1.1
- Changed the interval from 0.03 to 1.00 (improves performance)
- Item now is properly removed


Keywords:
simple, item, clean, cleanup, system, defskull, indexing, rpg, drop, ground, remove, destroy.
Contents

Just another Warcraft III map (Map)

Reviews
17 August 2012 Bribe: This is redundant. We already have GUI Item Cleanup which does everything this does but with only 1 trigger. http://www.hiveworkshop.com/forums/spells-569/item-cleanup-1-2-a-201057/ I will reject this now. Feel free to PM...

Moderator

M

Moderator

17 August 2012
Bribe: This is redundant. We already have GUI Item Cleanup which does everything this does but with only 1 trigger.

http://www.hiveworkshop.com/forums/spells-569/item-cleanup-1-2-a-201057/

I will reject this now. Feel free to PM me if you disagree.

22:51, 15th Aug 2012
Magtheridon96: Okay, I don't care about the title now.

This is a pretty weird system.
I mean, I could just drop an item on the ground, and it's gone 5 seconds later ._.

No matter, first of all, it would be beneficial if you just set the life of the items stored in the array to 0.41 and remove instead of enumerating over all items on the map and THEN doing that.

What you could do is register a "Unit Acquires Item" event and destroy the instance instead. (If it exists)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Well, you assume that all people knows how to read triggers rather than just a simple implement ?
You have to do minor adjustment to the Bribe's trigger to support clean item from loot from unit or unit drops item.
Now I only see it cleans Tomes (before adjust)

Well, my system is that once you have implement, it supports that features automatically without needing to adjust it (well, for configurables, it's different story).

In short, it will make this system user-friendly.

Also, to compare Bribe's and mine, it's 2 different thing where his system clean Tomes that are leaks upon taking it and mine is cleaning item on the floor dropped by unit or loot.

The systems share the same concept, but different execution of ideas.
 
Level 25
Joined
Jun 5, 2008
Messages
2,573
What the hell are you talking about?

Bribe's system automatically cleans all dead items every 15 seconds, not just tomes.
And it is easier to implement and use.

However seeing as this does a another thing (the title is missleading a bit), you shouldn't use a 0.03 second timer, it is redundant, no one will want their items removed after 0.03 seconds, put it to a more sensible interval (1.0 seconds for example.)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Bribe's does not automatically allow the dropped/loot item to be registered to the system and be removed after X seconds (I'm talking about normal items, not Tomes), as I said you have to adjust it for yourselves, since that is not the point of a "system". A system will keep you as easy as possible, just like my system, you don't need the adjustment, just a simple copy and paste, there, it is installed.

For Bribe, it is heavily focused on Tomes leak (after taking Tomes), whereas my system is focused on Items on the ground.

As I stated earlier, it's 2 different thing, but shared the same concept.

And I think this statement is a total nonsense;
And it is easier to implement and use.
What's so hard about copying the folder and paste it in your Trigger Editor ?

However for the interval, yeah I think change it to 1.00 second per interval would be more sensible.
 
Top