HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detect when Item Drops Then...

11-03-2006, 01:16 AM#1
Ignitedstar
I'm trying to create a trigger that detects when a certain item is dropped from ANY hero that is carrying the item. Then, it'll reduce the level of a certain ability acquired by the hero. However, I have NO idea how the heck I could do the conditions. Any help?
11-03-2006, 01:53 AM#2
[VDM]Amn
Trigger:
Collapse Events
Unit - A unit loses an item
Collapse Conditions
Item being manipulated equal to [your_item]
Collapse Actions
set level of [your_ability] for triggering unit to [level of [your_ability] - 1]

if that doesn't work, try the following event.
Trigger:
Collapse Events
Unit - A unit Is issued an order targeting a point
Collapse Conditions
Issued order equal to (string("itemdrop"))

something like that. good luck.
11-03-2006, 02:04 AM#3
The_AwaKening
Be a little more specific on the ability. Is it an ability that the item initially adds or raises; or is it just a normal hero ability? Are you ok using JASS, or do you need GUI?
11-03-2006, 11:18 PM#4
Ignitedstar
It's an ability that the item raises. The ability starts at first with the hero.

And I don't really mind if it is in JASS. So long as it can be understood.
11-04-2006, 02:55 AM#5
Mystic Prophet
heh, hey ignited. didn't feel like asking me? Amn's trigger (first one) should work just fine.
11-04-2006, 05:03 AM#6
Wyvernoid
Quote:
Originally Posted by [VDM]Amn
if that doesn't work, try the following event.
Trigger:
Collapse Events
Unit - A unit Is issued an order targeting a point
Collapse Conditions
Issued order equal to (string("itemdrop"))

something like that. good luck.
This one is wrong. If you ordered the unit to drop the item at a far away place, this trigger will trigger before the unit runs there. A worse situation is that the unit was issued itemdrop and then immediately issued stop - then the level will decrease with the item on the hero ^^

However, the first one seems to work quite well, at least to me. ;-)
11-05-2006, 12:30 AM#7
Ignitedstar
Whoops, my bad. I've been spacing out the last few days. Thanks you guys.

I feel dumb now. I complete forgot that there was a "Unit loses item" event.