How to make a normal survival game hotbar?

mrpumpkin

New member
1716812616428.png
Hi, I want to make a survival game hotbar. When I pressed 1, the character should equip and hold the rifle. When I pressed 2, the character should hold the grenade.
I'm using itemhotbar now. The problem is everything was OK when I equipped the rifle for the first time. Then I press 2, the grenade equipped but not being held by the character. Then I press 1 again, and the rifle is unequipped instead of holding it back.
Please help me with this. Thank you!
 
My guess is that this is probably related to your setup of ItemSetRule.

The Inventory System has an ItemSlotSet attached to the ItemSlotCollection. This defines how many items you can equip and in what slots. This is purely on the Inventory Side.

On the Character side you have ItemSetRules, which define how your character can mix and match equipped items. We differentiate "Soft Equip" and "Active Equipped" items. I would recommend you read more of the integration docs:


Now from what I understand, you want to be able to only equip one item at a time. Is that right?
In that case I would recommend having an ItemSlotCollection with a single slot. You could call it "Character Weapon Equipment" or whatever feels appropriate.

The on your ItemSetRule you could set it to set it to a simple rule that active equips the item in Slot 0.

And that should do the trick. All items would be equipped in the right hand. only one item at a time.
This of course would be only for weapons (a.k.a CharacterItems ). You could have a different ItemSlotCollection for Equipping clothes, etc...

I hope that points you in the right direction
 
T
My guess is that this is probably related to your setup of ItemSetRule.

The Inventory System has an ItemSlotSet attached to the ItemSlotCollection. This defines how many items you can equip and in what slots. This is purely on the Inventory Side.

On the Character side you have ItemSetRules, which define how your character can mix and match equipped items. We differentiate "Soft Equip" and "Active Equipped" items. I would recommend you read more of the integration docs:


Now from what I understand, you want to be able to only equip one item at a time. Is that right?
In that case I would recommend having an ItemSlotCollection with a single slot. You could call it "Character Weapon Equipment" or whatever feels appropriate.

The on your ItemSetRule you could set it to set it to a simple rule that active equips the item in Slot 0.

And that should do the trick. All items would be equipped in the right hand. only one item at a time.
This of course would be only for weapons (a.k.a CharacterItems ). You could have a different ItemSlotCollection for Equipping clothes, etc...

I hope that points you in the right direction
Thank you, Sangemdoko.
1.I solved the weapons problem, but I can't figure out the grenade problem. Can't equip the right-hand grenade.
1716997047392.png
I made the Throwable item collection and the slot set. But it doesn't work.
2. And where is to set "Soft Equip" and "Active Equipped"?
 
Last edited:
Sorry I'm not following,
I thought what you wanted was only to equip one item at a time.
So why would you need to have two seperate ItemSlotCollections for Throwables and Weapons?

Anyways, you don't need two seperate ItemSlotCollections whether you can only equip one item at a time or not.

If you only want one item to be equipped at one time, then you want the ItemSlotSet to be with a single slot.

On the ItemSetRule you set it to equip the item in the right hand slot.


2.
"SoftEquip" means it is inside the ItemSlotCollection but the character does not have it actively equipped
"Active Equipped" means it is actively equipped on the character

So you can set it by simply choosing if the item is actively equipped or not, and if it is in the ItemSlotCollection

There is more detail in the documentation:
 
Sorry I'm not following,
I thought what you wanted was only to equip one item at a time.
So why would you need to have two seperate ItemSlotCollections for Throwables and Weapons?

Anyways, you don't need two seperate ItemSlotCollections whether you can only equip one item at a time or not.

If you only want one item to be equipped at one time, then you want the ItemSlotSet to be with a single slot.

On the ItemSetRule you set it to equip the item in the right hand slot.


2.
"SoftEquip" means it is inside the ItemSlotCollection but the character does not have it actively equipped
"Active Equipped" means it is actively equipped on the character

So you can set it by simply choosing if the item is actively equipped or not, and if it is in the ItemSlotCollection

There is more detail in the documentation:
Thank you, this helps me a lot. I will read this document carefully.
 
Back
Top