HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Why it doesn't work? =[

09-04-2009, 12:01 PM#1
Mendel
I have this Very simple trigger:

Trigger:
Check items
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
((Triggering unit) is A Hero) Equal to (==) True
Collapse Actions
Collapse Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
Collapse Loop - Actions
Collapse Do Multiple ActionsFor each (Integer B) from 1 to 6, do (Actions)
Collapse Loop - Actions
Collapse Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
A Not equal to (!=) B
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (==) (Item-class of (Item carried by (Hero manipulating item) in slot (Integer B)))
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (==) (Item-class of (Item being manipulated))
Collapse Then - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Game - Display to (Owner of (Hero manipulating item)), at offset (0.00, 0.00) the text: You already have a ...
Collapse Else - Actions
Do nothing

it's just doesn't work, it sepuse to drop the item wich is being picked up if the hero who is picking it up has another same class item :\

*if i drop the line:
Trigger:
Conditions
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (==) (Item-class of (Item being manipulated))

it works on the first try, but than if i drop the item wich is the hero holding he can never pick up a same class weapon again.... :S
09-04-2009, 12:17 PM#2
marshall
If I remember correctly, the event 'acuires an item' occurs whilst the unit is acquiring the item - the unit hasn't actually acquired the item yet so won't be able to drop it in the same thread.

Also it looks like your trigger code isn't a copy & paste from the trigger editor - I think you are not giving us the full code.
Oh, and are there any other triggers that could be firing at the same time and affecting your results?
09-04-2009, 12:51 PM#3
Mendel
well this is a direct copty paste from the editor i don't know why u say that :S
on my other map wich i copied this from it, instead of item class i used item type, and it worked perfectly, all i did was changing it from type to class and it doesn't work.

the thing is when my hero has an item than i order him to pick another item wich is same class it doesn't drop the knew item acuired...