Problems with item capacity - any recommendation?

Keplerians

New member
Hey all! :)

We are an small indie game development studio, starting to work in a multiplayer game.

Here is my question:

I am trying to configure a pickup item correctly. These are this item properties/behaviour:

- Capacity for the inventory: 1
- It is not a weapon, just an addon for the character (in the head). When the player pick up it, the player wears.
- Each player needs to take those items and put them in other place just interacting.
- It can't be dropped.

I am not being able to configure it as i want. I use PickUpItem component for the item and i have 2 scenarios:

- First one, the option to take the item when entering the trigger in PickUpItem component is enabled. Then, the item is being taken correctly.
But if I try to take more than 1 item, item doesn't disappear neither add to the inventory, although the inventory events keep coming as if I took the item.
- Second one, the option for taking the item when entering the trigger is disabled. Then, the item is being taken correctly.
But if I try to take more than 1 item, item disappears but not adding to the inventory, although the inventory events keep coming as if I took the item.


I have only 2 weeks of experience with this plugin (which is full of possibilities and very polished and professional).
I have been trying to make it work correctly for a week, reading documentation, here in the forum, etc.
I attach some pictures of my configuration for the pickup ability and the pickup item.

The pickup ability inspector:

pickup_ability_inspector.png

Item pickup inspector:

pickupitem_inspector.png


Thanks for the great support on this forum.
 
Last edited:
For a head you
- It is not a weapon, just an addon for the character (in the head). When the player pick up it, the player wears.
- Each player needs to take those items and put them in other place just interacting.
- It can't be dropped.
For an item that goes on the character's head you should create a new slot (slot 2) and have the item equip there. That way the item can be equipped independently from the character's hands. From there you likely will not want to use an animation event for the Equip or Unequip Event Triggers. This can be set on the Item component. Once you change the item to occupy the third slot (slot 2) then you should also change your ItemPickup component to use that slot.

It also doesn't look like the PickupItem ability has specified any ItemTypes so you'll want to specify your ItemType for that ability under the Pickup Item Types field.
 
Hey Justin, thanks for the info. I didn't know i can create a new slot.

Okay, i have set the item to occupy the slot 2. Now my issue is that i want to get the events of take item only when i have really taken the item.

I have a new component called "PunCharacterItemEvents" where i want to track the coming events from the Inventory. And i am getting the take item events while i already have that item in my inventory. Which events should i use for that?

Thanks for any support. Please, ask me for screenshots if you need them or if you think i have something bad configured.
 
Instead of tracking the events you should use the EquipUnequip ability to equip or unequip your new item. This will automatically sync over the network and you don't need to track any events.
 
I have been trying to make it work with the EquipUnequip event. Such event is working correctly, but the item capacity is not working for me.

I attach some pictures of my configuration. I don't know what i am doing wrong. I can't attach more images, and i don't want to make double-post...
Now i am in the 2º escenario i explained in my first post, but now the item is equipped correctly every time i take (it didn't work before).


Any help is very appreciated.


Captura de pantalla 2020-04-06 a las 14.46.22.png
Captura de pantalla 2020-04-06 a las 14.46.40.pngCaptura de pantalla 2020-04-06 a las 14.52.02.png
 
I have tried it and no, it doesn't start the ability. But instead, it is taking the pickup, it's weird.

Thanks.
 
The thing is: There is only 1 item of this type in the whole escenario. So when a player takes it, this item appears in other part of the escenario. A player can only take 1 item of this type at the same time. Before taking another item of this type, he needs to put it somewhere.

Then, as i said, with the current configuration, the player can take all the items of this type that appear in the escenario. The player should not be able to take more than 1 item of this type at the same time, since the capacity is 1. And now if the player have 1 item in the inventory, the capacity is working, the item is not being added to the inventory, but instead, it is disappearing...
 
When you pickup an item if you already have that item it shouldn't disappear. Can you reproduce that within the demo scene? The assault rifle has a capacity of one and if I pick up that assault rifle again then it stays equipped and doesn't disappear.
 
Well, i have tried the demo. If you take the assault rifle, having one equipped, Nolan takes the pickup, so it disappears. Maybe it's different since it also gives you bullets.

Let me know if is something i could do for fix it or see what i am doing wrong :).

Thanks.
 
I think that I am starting to understand. So when you pickup the item a second time you don't want it to disappear? Right now the item pickup always disappears even if it isn't technically added to the inventory. This feature currently is not implemented but I can add it to my list.
 
Top