• 🏆 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 Use Trouble

Status
Not open for further replies.
Level 9
Joined
Nov 28, 2008
Messages
704
Item Use Trouble - Solved

Interestingly, I've noticed that when I try to use an item, sometimes after I pick it up the ability when I use it will "fire" with it's animation, but any triggers responding to it don''t fire. If I drop the item, repick it up, or pick up another item, it will start working again (or sometimes stop).

Is this a simple problem I have been completely missing in every map? It seems to me like every single map works perfect with items but mine ;P.

I wasn't sure to post this in triggers or here, but whatever.

Edit: According to mare in Chat, it was in Vampirism Nightmare, and the creator fixed it. >.>! Im not alone!
 
Last edited:
Level 9
Joined
Nov 28, 2008
Messages
704
Uhm.. my map has nothing to do with it. The point is sometimes the Event - unit uses an item doesnt work. However, the Event - Unit Casts an Abiltity always fires. There is nothing my map would hosw or help since this is just a basic staff or preservation with warstomp on it (no cooldown, no mana cost), and it will not fire this event.

Alright, on testing, it triggers the USAGE of the spell on the item, but the item only triggers half the time. What the hell?
 
Last edited:
Level 13
Joined
Mar 4, 2009
Messages
1,156
Event unit uses an item -means that he is going to cast a spell from taht item
Event unit acquires and item - means that he picked it up from map
Event unit loses an item - means that his item is removed/doped

for every of this events use Item being manipulated and Hero manipulating an item

can you show me your trigger so i can see what´s wrong?

Note that some abilities don't have Event Finishes casting an ability or starts effect an ability if they don't have effect
 
Level 9
Joined
Nov 28, 2008
Messages
704
  • Untitled Trigger 003
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • Game - Display to (All players) the text: USE
Only occurs half the time. If you want my JASS trigger (which Id siabled so it is NOT its problem)

JASS:
function Trig_On_Suit_Use_Actions takes nothing returns nothing
    local unit Unit = GetManipulatingUnit()
    local integer ID = GetPlayerId(GetOwningPlayer(Unit))
    local item Item = GetManipulatedItem()
    call BJDebugMsg("Used")
    if GetItemType(Item) != ITEM_TYPE_POWERUP then
        return
    endif
    if PlayerData[ID].AlienID == GetUnitTypeId(Unit) then
        return
    endif
    if IsUnitType(Unit, UNIT_TYPE_PEON) == false then
        return
    endif
    call ChangeArmor(Unit, GetItemTypeId(Item))
endfunction

//===========================================================================
function InitTrig_On_Suit_Use takes nothing returns nothing
    set gg_trg_On_Suit_Use = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_On_Suit_Use, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddAction( gg_trg_On_Suit_Use, function Trig_On_Suit_Use_Actions )
endfunction




Alirhgities, I have tested my exact same problem on a different map. Things work perfectly there. This is the oddest thing I have ever had, since I copy pasted the object data, and there is no reason at all my triggers should be messing with it.


FINAL EDIT: Fixed. I had an order system that allows you to move while firing - I made a function called moveToLastorder. When the dummy skill was cast, it would fire as well.. which is retarded, because even then that should NOT interrupt the "item use" event, but it does.

Can I get a round of applause for Blizzard for making such a stupid way of handling "Use an Item"?
 
Last edited:
Status
Not open for further replies.
Top