HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Item Event Problem

11-13-2008, 05:29 PM#1
cohadar
Hero has 3 same items with unit target spell.
Is there some way to get both GetSpellTargetUnit() and GetManipulatedItem() in event Action?

first event does not load target unit, second does not load used item.
Collapse JASS:
call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
11-13-2008, 06:20 PM#2
Vexorian
No.

Put you can detect an item click order and for example save what was the last item slot that was clicked and use that in the spell.
11-13-2008, 07:08 PM#3
Troll-Brain
Or you can try to make a custom register event with the same shit process as DRES.
It should work but i didn't try.

If you want to make a thing like that you must use a custom GetManipulatedItem function.
11-13-2008, 07:20 PM#4
cohadar
Quote:
Originally Posted by Vexorian
No.

Put you can detect an item click order and for example save what was the last item slot that was clicked and use that in the spell.

I already do that, I was just hoping for a better solution...
2 triggers, one with TriggerSleepAction(0.0)
11-14-2008, 12:19 AM#5
Vexorian
I don't get why isn't it an optimal solution already, not getting why TriggerSleepAction is an issue or a requirement.