HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Item level condition

06-17-2003, 11:30 PM#1
ShadowElf2002
I have a trigger with an event of the "acquire an item" type.
On this trigger I have put a condition Item of type(item being manipulated)equal to(random level 9 item type).
Does this mean it will run whenever a hero picks up a level 9 item or what? If this wont work that way what can I use to insure that the level of the item is 9?
06-18-2003, 09:53 AM#2
Dead-Inside
An item is being manipulated
Item equal to level 9, that would be more "sure". Just test it.

Regards

(Above works)
06-18-2003, 04:32 PM#3
ShadowElf2002
Quote:
Originally posted by Dead-Inside
An item is being manipulated
Item equal to level 9, that would be more "sure". Just test it.

Regards


Dead-Inside,
Thats the kind of condition I wanted but I cant find anything that works like that anywhere! Could you do me a favor and find the exact thing?
06-18-2003, 04:44 PM#4
Dead-Inside
(Item type of (Item being manipulated)) equal to (Random level 9 item-type)

Item-Type comparsion

There you go. You can use it in either If/Then/Else or just plain Comparsion.

Regards
06-18-2003, 10:26 PM#5
Hivemind
That wont work as you intend. The statement (random lvl 9 Item Type) will pick a single random lvl 9 item to use as the compairison. So if you pick up the item it picked the triger will fire. Pick up any other item and it wont fire. Even if it is a lvl 9 item.

There are several ways to do this. The first is easiest but the most limited. It will only work for you if you only have a trigger for lvl 9 items. Make every lvl 9 item invulnerable when dropped/created with a trigger.

Event-
Unit - A unit owned by Player 1 (red) aquires a item

Condition-
((Item being manipulated) is invulnerable) Equal to True

If you want different item groups (ie: lvl 1, 2 3....items) to have seporate triggers then its a bit more involved. Make every item invulnerable when dropped/created. Set each item in a group to the same life total but different from all other groups. Example: lvl 1 = 100 life, lvl 2 = 200 life ....and so on. Then make this kind of triger...

Event -
Unit - A unit owned by Player 1 (red) aquires a item

Condition-
(Current life of(Item being manipulated)) is equil to 100

Current life can be found in real compairisons. This kind of thing can be used to do lots of different things with both units and items. Pick a real aspect of the item or unit that isnt important to the rest of the game and set it to any value. Then use that value in your triggers. The most common use for this is to set the value of a unit to the gold cost (or % of its cost) and use that as the sell price.

There are other ways to do it if you dont want indestrucable items but that would require a lot of triggers since there is no way to add items to a item group (that we could find) you would have to create a trigger for each item.
06-19-2003, 09:30 PM#6
ShadowElf2002
Well, can I check the health of an item in the inventory? or will this not work?
06-20-2003, 06:54 AM#7
Dead-Inside
LOL. An item is an item, mate. It can be checked whereever it is.

Regards
06-20-2003, 05:15 PM#8
ShadowElf2002
Well I dont really consider item life an intergral part of the game so I never really tested if it kept track of its hit points in the inventory.... oh well now I know
06-20-2003, 07:15 PM#9
Dead-Inside
If it didn't, you'd be able to almost kill it, put it in your inventory, drop it on the ground and do it again... The blizzard people doesn't have that bad of a programming staff.

Regards
Dead-Inside