• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Item Class Restriction

Level 11
Joined
Aug 11, 2009
Messages
594
So I want Heroes to only be able to carry 1 item of each item class, except for Miscellaneous. However, it wont allow me to pick up any Miscellaneous items at all, even when inventory is empty. Maybe I'm just blind but why is that? xD


  • Item Class Restriction
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Not equal to Miscellaneous
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Item-class of (Item carried by (Triggering unit) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
                  • (Item carried by (Triggering unit) in slot (Integer A)) Not equal to (Item being manipulated)
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit).
            • Else - Actions
 

Uncle

Warcraft Moderator
Level 66
Joined
Aug 10, 2018
Messages
6,724
I would use some variables to see if that fixes things:
  • Item Class Restriction
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Not equal to Miscellaneous
    • Actions
      • Set Variable Item_Unit = (Triggering unit)
      • Set Variable Item_Found = (Item being manipulated)
      • Set Variable Item_Class = (Item-class of ItemFound)
      • For each Item_Loop from 1 to 6, do (Actions)
        • Loop - Actions
          • Set Variable Item_Other = (Item carried by Item_Unit in slot Item_Loop)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-class of Item_Other) Equal to Item_Class
              • Item_Other Not equal to Item_Found
            • Then - Actions
              • Hero - Drop Item_Found from Item_Unit.
            • Else - Actions[
I imagine you have other triggers related to acquiring/losing items that are interfering.

Also, your use of the AND condition is unnecessary:
  • And - All (Conditions) are true
That's the default behavior of Conditions. That's why your If Then Else statement says "If (All Conditions are True)".
 
Last edited:
Level 11
Joined
Aug 11, 2009
Messages
594
Putting variables didnt help but i am using alot of Aquired item triggers. Im using it for teleport to different areas etc. Should i put variables in all of them aswell?

An example would be

  • Camp11 Enter
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Stage 1-1
    • Actions
      • Set VariableSet Point_Move = (Center of Camp11 Start <gen>)
      • Unit - Move (Triggering unit) instantly to Point_Move
      • Camera - Pan camera for (Owner of (Triggering unit)) to Point_Move over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Point_Move)
      • Set VariableSet Boolean_CampaignActive[1] = True
 

Uncle

Warcraft Moderator
Level 66
Joined
Aug 10, 2018
Messages
6,724
I think it would be the Lose item events that could potentially cause problems since you're dropping the item. Using those variables in the other triggers would sort of defeat the purpose since we want them to be exclusive to the Item Class Restriction trigger in an attempt to prevent any outside conflicts. That being said, there's a good chance that those variables are only making the trigger more efficient and the problem lies elsewhere.

How about testing the trigger in a separate map? That would tell you right away if some outside trigger was interfering.

Also, maybe double check to see that you're actually picking up Miscellaneous items. There's always the chance that you're making a silly mistake.
 
Level 11
Joined
Aug 11, 2009
Messages
594
I tried it on a new map with no other triggers, its still the same. So there is something wrong with this specific one.
 
Level 11
Joined
Aug 11, 2009
Messages
594
Ah man, thats too bad! I need all the different item classes xD
Is there any other easy way to restrict items?

EDIT: I used Real - Item Life instead and set the different items lives from 1-7 to get different item classes :) thanks for all your help though! I really appreciate it.
 
Last edited:
Level 22
Joined
Aug 29, 2012
Messages
897
In my map I use pretty much the same concept but with item levels, e.g. 1 for weapon, 2 for offhand, 3 armor etc. since this value isn't really used outside of melee maps, then you can use your trigger replacing item class check with integers
 

Uncle

Warcraft Moderator
Level 66
Joined
Aug 10, 2018
Messages
6,724
Ah man, thats too bad! I need all the different item classes xD
Is there any other easy way to restrict items?
Hashtable / Arrays and a somewhat simple system can allow you to create as many custom item classes as you'd like.

Here's a system I just made, hopefully you're on the latest patch if you're interested in using it :D
  • CIC Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- We need to create the Hashtable before doing anything else. Don't change this: --------
      • Hashtable - Create a hashtable
      • Set VariableSet CIC_Item_Hash = (Last created hashtable)
      • -------- --------
      • -------- Give each custom class a unique Integer value to set it apart from other classes (start at 1 and work your way up): --------
      • Set VariableSet CIC_ARMOR = 1
      • Set VariableSet CIC_WEAPON = 2
      • Set VariableSet CIC_TRINKET = 3
      • -------- --------
      • -------- Now we can setup all of our items to use these custom item classes! --------
      • -------- Use the CIC_Setup variables to define the Item-Type, it's new custom Item Class, and the Item Limit for max carried at once: --------
      • -------- --------
      • Set VariableSet CIC_Setup_Item_Type = Crown of Kings +5
      • Set VariableSet CIC_Setup_Item_Class = CIC_ARMOR
      • Set VariableSet CIC_Setup_Item_Limit = 1
      • Trigger - Run CIC Add To System <gen> (ignoring conditions)
      • -------- --------
      • Set VariableSet CIC_Setup_Item_Type = Claws of Attack +15
      • Set VariableSet CIC_Setup_Item_Class = CIC_WEAPON
      • Set VariableSet CIC_Setup_Item_Limit = 1
      • Trigger - Run CIC Add To System <gen> (ignoring conditions)
      • -------- --------
      • Set VariableSet CIC_Setup_Item_Type = Ring of Protection +5
      • Set VariableSet CIC_Setup_Item_Class = CIC_TRINKET
      • Set VariableSet CIC_Setup_Item_Limit = 3
      • Trigger - Run CIC Add To System <gen> (ignoring conditions)
  • CIC Add To System
    • Events
    • Conditions
    • Actions
      • -------- This trigger saves the data about our custom item class in the hashtable. --------
      • -------- This is done by taking advantage of the item's item-type id (an integer that's hidden in GUI). --------
      • -------- --------
      • Custom script: set udg_CIC_Item_Id = udg_CIC_Setup_Item_Type
      • Hashtable - Save CIC_Setup_Item_Class as 0 of CIC_Item_Id in CIC_Item_Hash.
      • Hashtable - Save CIC_Setup_Item_Limit as 1 of CIC_Item_Id in CIC_Item_Hash.
      • -------- --------
      • -------- We can now get the class of this item-type whenever we want! --------
  • CIC Acquire Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • -------- Get the item's Item-Type id so we can use it to load the data from our hashtable: --------
      • Set VariableSet CIC_Item = (Item being manipulated)
      • Custom script: set udg_CIC_Item_Id = GetItemTypeId(udg_CIC_Item)
      • -------- --------
      • -------- Using the id we can load the class and the carry limit of our item: --------
      • Set VariableSet CIC_Class = (Load 0 of CIC_Item_Id from CIC_Item_Hash.)
      • Set VariableSet CIC_Limit = (Load 1 of CIC_Item_Id from CIC_Item_Hash.)
      • -------- --------
      • -------- If the loaded data is 0 that means that this item doesn't have a custom item class and we can skip it: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to 0
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Use the Unit Indexer system to track how many items of each custom class the unit has: --------
      • Set VariableSet CV = (Custom value of (Triggering unit))
      • -------- --------
      • -------- Check if it was a ARMOR and how many ARMORS we already have (limit of 1): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_ARMOR
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CIC_ARMOR_Count[CV] Less than CIC_Limit
            • Then - Actions
              • Set VariableSet CIC_ARMOR_Count[CV] = (CIC_ARMOR_Count[CV] + 1)
            • Else - Actions
              • -------- Limit reached! --------
              • Trigger - Turn off CIC Lose Item <gen>
              • Hero - Drop CIC_Item from (Triggering unit).
              • Trigger - Turn on CIC Lose Item <gen>
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Check if it was a WEAPON and how many WEAPONS we already have (limit of 1): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_WEAPON
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CIC_WEAPON_Count[CV] Less than CIC_Limit
            • Then - Actions
              • Set VariableSet CIC_WEAPON_Count[CV] = (CIC_WEAPON_Count[CV] + 1)
            • Else - Actions
              • -------- Limit reached! --------
              • Trigger - Turn off CIC Lose Item <gen>
              • Hero - Drop CIC_Item from (Triggering unit).
              • Trigger - Turn on CIC Lose Item <gen>
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Check if it was a TRINKET and how many TRINKETS we already have (limit of 3): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_TRINKET
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CIC_TRINKET_Count[CV] Less than CIC_Limit
            • Then - Actions
              • Set VariableSet CIC_TRINKET_Count[CV] = (CIC_TRINKET_Count[CV] + 1)
            • Else - Actions
              • -------- Limit reached! --------
              • Trigger - Turn off CIC Lose Item <gen>
              • Hero - Drop CIC_Item from (Triggering unit).
              • Trigger - Turn on CIC Lose Item <gen>
          • Skip remaining actions
        • Else - Actions
      • -------- --------
  • CIC Lose Item
    • Events
      • Unit - A unit Loses an item
    • Conditions
    • Actions
      • -------- Get the item's Item-Type id so we can use it to load the data from our hashtable: --------
      • Set VariableSet CIC_Item = (Item being manipulated)
      • Custom script: set udg_CIC_Item_Id = GetItemTypeId(udg_CIC_Item)
      • -------- --------
      • -------- Using the id we can load the class and the carry limit of our item: --------
      • Set VariableSet CIC_Class = (Load 0 of CIC_Item_Id from CIC_Item_Hash.)
      • Set VariableSet CIC_Limit = (Load 1 of CIC_Item_Id from CIC_Item_Hash.)
      • -------- --------
      • -------- If the loaded data is 0 that means that this item doesn't have a custom item class and we can skip it: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to 0
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Use the Unit Indexer system to track how many items of each custom class the unit has: --------
      • Set VariableSet CV = (Custom value of (Triggering unit))
      • -------- --------
      • -------- Check if it was a ARMOR and reduce how many ARMORS we have (limit of 1): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_ARMOR
        • Then - Actions
          • Set VariableSet CIC_ARMOR_Count[CV] = (CIC_ARMOR_Count[CV] - 1)
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Check if it was a WEAPON and reduce how many WEAPONS we have (limit of 1): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_WEAPON
        • Then - Actions
          • Set VariableSet CIC_WEAPON_Count[CV] = (CIC_WEAPON_Count[CV] - 1)
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Check if it was a TRINKET and reduce how many TRINKETS we have (limit of 3): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_TRINKET
        • Then - Actions
          • Set VariableSet CIC_TRINKET_Count[CV] = (CIC_TRINKET_Count[CV] - 1)
          • Skip remaining actions
        • Else - Actions
This has 3 custom classes by default: ARMOR, WEAPON, and TRINKET. You can hold 1 Weapon, 1 Armor, and up to 3 Trinkets at a time. You can add as many custom classes as you'd like and the system is optional so not every item needs a custom class. You can also customize the limits to adjust how many of each class you can carry. Note that I'm using a Unit Indexer to track how many of each Item Class you have equipped. I find this system is a must have in GUI maps. You should be using it! In this case you NEED to use it for the triggers to work.

If you wanted to add a new custom item class then you would follow these steps:

1) Create a new Integer variable and name it CIC_CLASS and create a new Integer array variable and name it CIC_CLASS_Count. Don't forget to replace CLASS with the actual name of your new custom class.

2) Go to the CIC Setup trigger. You can see ARMOR, WEAPON, and TRINKET are being defined in here so just copy and paste the last of those and follow the pattern/instructions. If TRINKET's value is set to 3 then your new 4th class should be set to have a value of 4.

3) Go to the bottom of the CIC Acquire Item trigger, copy and paste an existing If Then Else for another Item Class, and adjust it's variables to use your new CIC_CLASS and CIC_CLASS_Count variables.

4) Go to the bottom of the CIC Lose Item trigger, copy and paste an existing If Then Else for another Item Class, and adjust it's variables to use your new CIC_CLASS and CIC_CLASS_Count variables.

It's really just a matter of following the pattern that my 3 example classes use.
 

Attachments

  • Custom Item Classes 1.w3m
    26.6 KB · Views: 5
Last edited:
Level 11
Joined
Aug 11, 2009
Messages
594
Hashtable / Arrays and a somewhat simple system can allow you to create as many custom item classes as you'd like.

Here's a system I just made, hopefully you're on the latest patch if you're interested in using it :D
  • CIC Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- We need to create the Hashtable before doing anything else. Don't change this: --------
      • Hashtable - Create a hashtable
      • Set VariableSet CIC_Item_Hash = (Last created hashtable)
      • -------- --------
      • -------- Give each custom class a unique Integer value to set it apart from other classes (start at 1 and work your way up): --------
      • Set VariableSet CIC_ARMOR = 1
      • Set VariableSet CIC_WEAPON = 2
      • Set VariableSet CIC_TRINKET = 3
      • -------- --------
      • -------- Now we can setup all of our items to use these custom item classes! --------
      • -------- Use the CIC_Setup variables to define the Item-Type, it's new custom Item Class, and the Item Limit for max carried at once: --------
      • -------- --------
      • Set VariableSet CIC_Setup_Item_Type = Crown of Kings +5
      • Set VariableSet CIC_Setup_Item_Class = CIC_ARMOR
      • Set VariableSet CIC_Setup_Item_Limit = 1
      • Trigger - Run CIC Add To System <gen> (ignoring conditions)
      • -------- --------
      • Set VariableSet CIC_Setup_Item_Type = Claws of Attack +15
      • Set VariableSet CIC_Setup_Item_Class = CIC_WEAPON
      • Set VariableSet CIC_Setup_Item_Limit = 1
      • Trigger - Run CIC Add To System <gen> (ignoring conditions)
      • -------- --------
      • Set VariableSet CIC_Setup_Item_Type = Ring of Protection +5
      • Set VariableSet CIC_Setup_Item_Class = CIC_TRINKET
      • Set VariableSet CIC_Setup_Item_Limit = 3
      • Trigger - Run CIC Add To System <gen> (ignoring conditions)
  • CIC Add To System
    • Events
    • Conditions
    • Actions
      • -------- This trigger saves the data about our custom item class in the hashtable. --------
      • -------- This is done by taking advantage of the item's item-type id (an integer that's hidden in GUI). --------
      • -------- --------
      • Custom script: set udg_CIC_Item_Id = udg_CIC_Setup_Item_Type
      • Hashtable - Save CIC_Setup_Item_Class as 0 of CIC_Item_Id in CIC_Item_Hash.
      • Hashtable - Save CIC_Setup_Item_Limit as 1 of CIC_Item_Id in CIC_Item_Hash.
      • -------- --------
      • -------- We can now get the class of this item-type whenever we want! --------
  • CIC Acquire Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • -------- Get the item's Item-Type id so we can use it to load the data from our hashtable: --------
      • Set VariableSet CIC_Item = (Item being manipulated)
      • Custom script: set udg_CIC_Item_Id = GetItemTypeId(udg_CIC_Item)
      • -------- --------
      • -------- Using the id we can load the class and the carry limit of our item: --------
      • Set VariableSet CIC_Class = (Load 0 of CIC_Item_Id from CIC_Item_Hash.)
      • Set VariableSet CIC_Limit = (Load 1 of CIC_Item_Id from CIC_Item_Hash.)
      • -------- --------
      • -------- If the loaded data is 0 that means that this item doesn't have a custom item class and we can skip it: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to 0
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Use the Unit Indexer system to track how many items of each custom class the unit has: --------
      • Set VariableSet CV = (Custom value of (Triggering unit))
      • -------- --------
      • -------- Check if it was a ARMOR and how many ARMORS we already have (limit of 1): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_ARMOR
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CIC_ARMOR_Count[CV] Less than CIC_Limit
            • Then - Actions
              • Set VariableSet CIC_ARMOR_Count[CV] = (CIC_ARMOR_Count[CV] + 1)
            • Else - Actions
              • -------- Limit reached! --------
              • Trigger - Turn off CIC Lose Item <gen>
              • Hero - Drop CIC_Item from (Triggering unit).
              • Trigger - Turn on CIC Lose Item <gen>
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Check if it was a WEAPON and how many WEAPONS we already have (limit of 1): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_WEAPON
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CIC_WEAPON_Count[CV] Less than CIC_Limit
            • Then - Actions
              • Set VariableSet CIC_WEAPON_Count[CV] = (CIC_WEAPON_Count[CV] + 1)
            • Else - Actions
              • -------- Limit reached! --------
              • Trigger - Turn off CIC Lose Item <gen>
              • Hero - Drop CIC_Item from (Triggering unit).
              • Trigger - Turn on CIC Lose Item <gen>
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Check if it was a TRINKET and how many TRINKETS we already have (limit of 3): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_TRINKET
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CIC_TRINKET_Count[CV] Less than CIC_Limit
            • Then - Actions
              • Set VariableSet CIC_TRINKET_Count[CV] = (CIC_TRINKET_Count[CV] + 1)
            • Else - Actions
              • -------- Limit reached! --------
              • Trigger - Turn off CIC Lose Item <gen>
              • Hero - Drop CIC_Item from (Triggering unit).
              • Trigger - Turn on CIC Lose Item <gen>
          • Skip remaining actions
        • Else - Actions
      • -------- --------
  • CIC Lose Item
    • Events
      • Unit - A unit Loses an item
    • Conditions
    • Actions
      • -------- Get the item's Item-Type id so we can use it to load the data from our hashtable: --------
      • Set VariableSet CIC_Item = (Item being manipulated)
      • Custom script: set udg_CIC_Item_Id = GetItemTypeId(udg_CIC_Item)
      • -------- --------
      • -------- Using the id we can load the class and the carry limit of our item: --------
      • Set VariableSet CIC_Class = (Load 0 of CIC_Item_Id from CIC_Item_Hash.)
      • Set VariableSet CIC_Limit = (Load 1 of CIC_Item_Id from CIC_Item_Hash.)
      • -------- --------
      • -------- If the loaded data is 0 that means that this item doesn't have a custom item class and we can skip it: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to 0
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Use the Unit Indexer system to track how many items of each custom class the unit has: --------
      • Set VariableSet CV = (Custom value of (Triggering unit))
      • -------- --------
      • -------- Check if it was a ARMOR and reduce how many ARMORS we have (limit of 1): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_ARMOR
        • Then - Actions
          • Set VariableSet CIC_ARMOR_Count[CV] = (CIC_ARMOR_Count[CV] - 1)
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Check if it was a WEAPON and reduce how many WEAPONS we have (limit of 1): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_WEAPON
        • Then - Actions
          • Set VariableSet CIC_WEAPON_Count[CV] = (CIC_WEAPON_Count[CV] - 1)
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Check if it was a TRINKET and reduce how many TRINKETS we have (limit of 3): --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CIC_Class Equal to CIC_TRINKET
        • Then - Actions
          • Set VariableSet CIC_TRINKET_Count[CV] = (CIC_TRINKET_Count[CV] - 1)
          • Skip remaining actions
        • Else - Actions
This has 3 custom classes by default: ARMOR, WEAPON, and TRINKET. You can hold 1 Weapon, 1 Armor, and up to 3 Trinkets at a time. You can add as many custom classes as you'd like and the system is optional so not every item needs a custom class. You can also customize the limits to adjust how many of each class you can carry. Note that I'm using a Unit Indexer to track how many of each Item Class you have equipped. I find this system is a must have in GUI maps and here it helps keep things organized. You should be using it!

If you wanted to add a new custom item class then you would follow these steps:

1) Create a new Integer variable and name it CIC_CLASS and create a new Integer array variable and name it CIC_CLASS_Count. Don't forget to replace CLASS with the actual name of your new custom class.

2) Go to the CIC Setup trigger. You can see ARMOR, WEAPON, and TRINKET are being defined in here so just copy and paste one of those and change it to reference your new class and give it a unique value (follow the pattern/instructions).

3) Go to the bottom of the CIC Acquire Item trigger, copy and paste an existing If Then Else for another Item Class, and adjust it's variables to use your new CIC_CLASS and CIC_CLASS_Count variables.

4) Go to the bottom of the CIC Lose Item trigger, copy and paste an existing If Then Else for another Item Class, and adjust it's variables to use your new CIC_CLASS and CIC_CLASS_Count variables.

It's really just a matter of following the pattern that my 3 example classes use.
That is amazing! Thank you for putting down so much work!

I used Real - Item life with values from 1-7 to get different item classes but this seems like a more solid system 👍
 
Top