HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Tiny Tomes Adventures

11-07-2009, 09:07 PM#1
Panto
Greetings.

When a hero picks up a powerup stat bonus book, it appears to leave a very tiny model of the book sitting there on the ground. Like it's never destroying the item, just shrinking it? Is this some funny aspect of Warcraft that just never surfaced to my attention?

11-07-2009, 09:17 PM#2
ploks
I guess this has something to do with it.
11-07-2009, 09:25 PM#3
Panto
Super, thanks!

EDIT: BTW, it can be solved pretty quickly by this:

Collapse JASS:
function Trig_Tome_cleanliness_Conditions takes nothing returns boolean
    return GetItemType(GetManipulatedItem()) == ITEM_TYPE_POWERUP
endfunction

function Trig_Tome_cleanliness_Actions takes nothing returns nothing
    local item itTome = GetManipulatedItem()

    call PolledWait(0.25)

    call RemoveItem(itTome)
    set itTome = null
endfunction

//===========================================================================
function InitTrig_Tome_cleanliness takes nothing returns nothing
    set gg_trg_Tome_cleanliness = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Tome_cleanliness, EVENT_PLAYER_UNIT_PICKUP_ITEM)
    call TriggerAddCondition(gg_trg_Tome_cleanliness, Condition(function Trig_Tome_cleanliness_Conditions))
    call TriggerAddAction(gg_trg_Tome_cleanliness, function Trig_Tome_cleanliness_Actions)
endfunction

I haven't confirmed that a wait is necessary.