HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Searching Inventory??

11-29-2006, 08:57 PM#1
Valdez
What Condition would I use to see if a Hero has a Specific Item in any of his item slots?? Also how would I set up this condition??

Thanks,
~Valdez
11-29-2006, 10:13 PM#2
Waldbaer
Use item comparison: item carried by YourHero of Type TypeOfYourItem equal to yourItem.
What do you mean by "how to set up this condition"?
11-29-2006, 11:09 PM#3
Valdez
I mean what it would look like in the actual world editors context. Now see, I got all the way up to the first part of your post, the entry after "Equal to" is the one I have trouble with.

Like so:
Trigger:
Collapse Events
Unit - A unit Dies
Collapse Conditions
(Owner of(Dying unit)) Equal to Neutral Hostile
Collapse Actions
Hero - Instantly revive (Dying unit) at (Center of(Playable map area)), Hide revival graphics
11-30-2006, 12:07 AM#4
shadowange1
I dont have my editor open right now but this should be good enough for you
you can have a multiple OR condition for all slots. Or you can create a for loop(1 to 6) and have an if statement inside. and the type of item can be either a variable set to an item or just a select an item in condition.
11-30-2006, 12:09 AM#5
Valdez
yea...you lost me :)
11-30-2006, 12:15 AM#6
TaintedReality
Why not just use the boolean condition, Unit Has Item of Type? I don't see what exactly the problem is, you should have something that looks like this:

Trigger:
Collapse Events
Unit - A unit Dies
Collapse Conditions
(Owner of (Dying unit)) Equal to Neutral Victim
((Dying unit) has an item of type YourItem) Equal to True
Collapse Actions
Hero - Instantly revive (Dying unit) at (Center of (Playable map area)), Hide revival graphics
11-30-2006, 12:36 AM#7
Valdez
That'll work, thx a bunch, problem was I never thought of using Boolean. Guess I'm just not that smart lolz.
11-30-2006, 02:37 AM#8
TaintedReality
Eh Blizzard likes to hide those conditions in all sorts of places ; ). Once you get used to it they make sense though.