Jump to content

Inifinite item Stacking Problem


Mebantiza

Recommended Posts

I have an item in a mod I am working on, that is stacking with all other tier versions of the same item, and with items from other mods entirely that have the same effect. It is a weight enhancing bag, and there are 6 tiers of it. In game, you can equip all 6 at once, allowing every carry weight effect to become additive. The player can end up with 600-700 carry weight or so if all them end up being crafted.

 

The item , a bag, has no bi-ped slot assigned to it, it was set up to be invisible* The items model, is a ground bag, and was not set up to be visible on the character.

 

The AA slot it was assigned to was, 36, I changed this this to 47, but it still stacks with the same items AND it also stacks with another carry weight backpack from another mod entirely. I dont have a problem with the bag being an invisible accessory, but I dont want 6 being equipped at once either.

 

There are some other 'invisible' type items from the mod assigned to use the same AA as the bag. This leads to the user being able to stack a lot of invisible items, as they are all using the same slot, but, the engine is allowing this.

There is also a set of 'Gem's (invisible again), the mod adds, that will also use the same AA as the bag is, so again, these gems, weight bags all end up stacking. Would I would much prefer, is the player only able equip one weight bag, or one Gem of XXXX, and not all of them at the same time.

 

What do I need to change, enable, set, so, these weight bags will only allow the player to equip one at a time?

Link to comment
Share on other sites

If you want to take a script route... Use a player alias script with the OnObjectEquipped event and should the object be one of your items, unequip any of the items you deem not allowed to be worn at the same time. If an item is not equipped an unequip call shouldn't cause any harm, but you can still do a check if you wish.

 

But you can also make an "invisible" model and still assign a bi-ped slot. Use a small enough mesh that you can translate its position so that it is completely hidden inside the player's body. It won't be seen, but will also take up the body slot and thus be forcibly unequipped when another in the same slot is used.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...