HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

need help with a condition intiger comparison

10-23-2006, 08:08 AM#1
Nazra7
i need an intiger comparison that compares how many items a hero is carrying by type.

number of items carried by hero of type

but the latest we version nor we unlimited has this condition. is there a custom script or somthing i could use to use this condition?
10-23-2006, 10:02 AM#2
The)TideHunter(
Use loops, this is a situation that works great for them.
Have a global integer, called whatever, something like "NumberOfItemType" or something.

And use this:

Trigger:
Actions
Collapse For each (Integer A) from 1 to 6, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Item carried by (Your Unit) in slot (Integer A))) Equal to Your Item
Collapse Then - Actions
Set YourInteger = (YourInteger + 1)
Else - Actions

the integer YourInteger will then show how many items of a type the unit has.