I have a use case where depending on what items that the character has equipped, I want to change what item set rules are active.
- Specifically, if the character only has a shield equipped, it can equip the shield without a weapon. I have this defined as ShieldItemSetRule.
- Or if the character has a weapon and a shield, it can equip both the weapon and the shield. I have this defined as WeaponShieldItemSetRule.
- By default, the character has a single item set group with WeaponShieldItemSetRule as the single item set rule.
- When the character spawns for the first time, it checks the weapon loadout. If there's no weapon, then we want to activate ShieldItemSetRule. My initial thought was to simply add the item set rule using
Code:
m_ItemSetGroup.AddItemSetRule(itemSetRule);
- Then, when the character picks up a weapon for the first time, I want to disable the ShieldItemSetRule so that the character must equip a weapon. Do I do this by calling
Code:
m_ItemSetGroup.RemoveItemSetRule(itemSetRule);