HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Yet again the wc3editor is trying to fool me:

05-22-2007, 01:59 PM#1
Bloodlust
Trigger:
Save Items
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Triggering unit) Equal to SomeUnit
Collapse Actions
Set SomeUnitItems[1] = (Item carried by SomeUnit in slot 1)
Set SomeUnitItems[2] = (Item carried by SomeUnit in slot 2)
Trigger:
Companion Dies
Collapse Events
Unit - A unit Dies
Collapse Conditions
(Triggering unit) Equal to SomeUnit
Collapse Actions
Item - Move SomeUnitItems[1] to (Center of SomeUnitItemStore <gen>)
Item - Move SomeUnitItems[2] to (Center of SomeUnitItemStore <gen>)
Trigger:
Some Unit Rezz
Hero - Give SomeUnitItems[1] to SomeUnit
Hero - Give SomeUnitItems[2] to SomeUnit

Why in all nine hells is only item[1] given to the unit and not both? I just dont get it...

____________________

I check the variable, both items are saved.. however, I cannot give the unit both items. Even if I use 2 different trigger or give it one item first, drop it, give it second, let it collect first again.. doesnt work.
05-22-2007, 05:48 PM#2
Pyrogasm
Is it simply incapable of giving SomeUnitItems[2]? If you remove the line that gives the unit SomeUnitItems[1], does the unit get SomeUnitItems[2]?

Maybe you can't give both items instantaneously; try giving it one item, waiting, and then giving it another item.
05-22-2007, 07:38 PM#3
Pinzu
Why move the item, when you can just hide and then unhide it?

Do you run the Give item to hero exacly when he gets revived?

I've experienced this sort of bug once, when item was droped i wanted a special effect to be created at its location, it didn't work until i added

Trigger:
Wait 1.00 seconds


So you should try to add Wait 1.00 second and then give the item to the hero.

I'm no trigger master, so this will not salve your sulotion i think, but its worth a try!
05-23-2007, 12:00 PM#4
Bloodlust
if i swap lines the unit (yes, no hero) gets item[2] but not item[1]
i added wait
i made 2 triggers

nothing worked

hiding didnt work either + i want it moved
05-23-2007, 12:31 PM#5
Pinzu
Maybe you should show us the whole trigger such as actions befor, events, conditions etz...
05-23-2007, 12:54 PM#6
Captain Griffen
When it re-aquires the first one, won't that set the second variable to null?
05-23-2007, 12:55 PM#7
Anitarf
Perhaps you have a trigger running on "unit acquires an item" event that somehow prevents the second item from being added after the adding of the first item triggers it?
Edit: oh, duh, yes you do have such a trigger, as pointed out by Griffen.
05-23-2007, 12:56 PM#8
MindWorX
Quote:
Originally Posted by Captain Griffen
When it re-aquires the first one, won't that set the second variable to null?
It will, unless there's actually an item in slot 2.
05-23-2007, 06:37 PM#9
Bloodlust
OMG thanks, i am so stupid

when I give the items to the unit, the empty slot will be saved...


big thanks.