• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Tome of Experiance Bug

Status
Not open for further replies.
Level 7
Joined
Jun 19, 2017
Messages
147
Hello, i have a question regarding the items that are "used when acquired" like the Tome of Experiance.
The problem is that, when you use it from the ground it leaves a permanent graphic glitch on it's spot that looks like a regular tome but unclickable, and it doesn't dissappear at all.
Screenshot below. On it you can see the small tomes on the ground, although unclickable, they are just ugly. Any idea how to remove them ?
 

Attachments

  • Tome of Experiance bug.png
    Tome of Experiance bug.png
    2 MB · Views: 184
You can remove the item when it's picked up. However this will also remove the death animation of the item, so you might want to wait a little before you remove it.
The easiest way is to use a local variable and a wait:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Powerup
    • Actions
      • Custom script: local item itm = GetManipulatedItem()
      • Wait 0.50 seconds
      • Custom script: call RemoveItem(itm)
      • Custom script: set itm = null
 
Didn't think about that. Then it's probably more complicated. There is already a resource in the spell section that should solve it: Item Cleanup 1.2
Check it out and see if it works for you.

The problem has already been there. The tomes just get very small so you can barely see them. If you are not looking for them you will most likely not see them.
 
Actually i found out this simple trigger works even better than the above mentioned "Item Cleanup 1.2". Can you check to tell me if it's good ?
  • Delete Tomes
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • 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
              • (Current life of (Picked item)) Equal to 0.00
            • Then - Actions
              • Item - Remove (Picked item)
            • Else - Actions
 
I know this is weird as hell, but "Item - Remove" natives does NOT remove an item when its health points are equal to 0.00. Set its life to 1.00, then remove it. Otherwise, Item enumerator will iterate over them all the time.
That's why "Item Cleanup" does this.

  • For each (Integer Loop) from 0 to ItemsToClean, do (Actions)
    • Loop - Actions
      • Item - Set life of CleanedItem[Loop] to 1.00
      • Item - Remove CleanedItem[Loop]
      • Set CleanedItem[Loop] = No item
 
Status
Not open for further replies.
Back
Top