HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Is it possible to create knew class classification for items?

07-03-2009, 03:02 AM#1
Mendel
i mean there is this artifact class and all these... so is there a way a create a costum class like weapons or armors.. so later i can manage the hero to carry only 1 weapon item 1 armor item ...
i have already figaurd out how to able the hero to carry only 1 item of type but than again he can carry like different types of claws of attack and that just not fits :S
07-03-2009, 03:06 AM#2
darkwulfv
No, the item classifications are static and can't be added or changed.

You'd have to trigger the whole thing.
07-04-2009, 12:23 AM#3
Fledermaus
Depending on how many classes you want, you can probably get away with using the ones already there.

Keep in mind the Misc classification doesn't work.
07-06-2009, 08:53 AM#4
Ranger21
Use level of items for classification
07-06-2009, 08:56 AM#5
Toadcop
or ItemUserData...
07-06-2009, 02:57 PM#6
Summoner
You can use Item Level to tell apart the items. Make same kind of items in the same level, e.g. Weapons Lv2, Shield Lv3, etc.


Create a Boolean-Array-Type variable with 7 sizes (here named Inventory), And use the follwing 2 triggers:

Item Acquire
Trigger:
Collapse Events
Unit - A unit Acquires an item
Conditions
Collapse Actions
Trigger - Turn off (This trigger)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Inventory[(Item level of (Item being manipulated))] Equal to False
Collapse Then - Actions
Hero - Drop the item from slot (Item level of (Item being manipulated)) of (Triggering unit)
Unit - Order (Triggering unit) to move (Item being manipulated) to inventory slot (Item level of (Item being manipulated))
Set Inventory[(Item level of (Item being manipulated))] = True
Collapse Else - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Trigger - Turn on (This trigger)

Item Lost or Drop
Trigger:
Collapse Events
Unit - A unit Loses an item
Conditions
Collapse Actions
Set Inventory[(Item level of (Item being manipulated))] = False

Using these triggers your Item Level must start with 2. Maybe becasue of bugs.
07-07-2009, 07:09 AM#7
Anachron
Why not triggering your item classes? Use the ItemUserData as the others already said, add a classstruct, add an itemarray and add the type of your icon. Then you can have endless classes.