HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Item dropped to region triggers actions

08-22-2006, 10:56 PM#1
Trickster
I need certain actions to happen when item is dropped from inventory to a region. Sort of like planting a seed, and it starts to grow. But I can't find an Event that would fit this situation. Help, anyone?
08-22-2006, 11:05 PM#2
Mezzer
Well, just combine the "Unit drops an item" event with checking if the item is in the right region.
08-23-2006, 12:53 AM#3
Trickster
Eah. Only found a Unit loses an item... Here's what I tried, didn't work tho.

Trigger:
Weed grows
Collapse Events
Unit - A unit Loses an item
Collapse Conditions
(Item-type of (Last dropped item)) Equal to Seed
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Last dropped item) is in Rect 000 <gen>) Equal to True
Collapse Then - Actions
Special Effect - Create a special effect at (Position of (Last dropped item)) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Collapse Else - Actions
Do nothing

(making a special effect on the spot just for the test, when I get it to work it'll be something else.)

Am I on the right tracks?
08-23-2006, 02:28 AM#4
Mystic Prophet
This should work.

Trigger:
item stuff
Collapse Events
Unit - A unit Loses an item
Collapse Conditions
(Item-type of (Item being manipulated)) Equal to Claws of Attack +15
(Region 000 <gen> contains (Triggering unit)) Equal to True
Collapse Actions
Special Effect - Create a special effect at (Center of Region 000 <gen>) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
08-23-2006, 07:33 AM#5
Trickster
Indeed, that did work. I used position of item being manipulated instead of the center of the region when placinbg the special effect... Ran into a funny problem, the effect goes to a random spot nearby, not the position of the dropped item.

Edit: ahh, I see. It picks the position where the item was before being picked up. any way around this?