Pickup Ability with version 2

MissBig

Member
Hi, I am trying to get the health pickup working by pressing the F key, which it does but when I try to do this with a weapon the text shows up to press the F key and when I press the f key it does not get picked up. I think there is a bug in it because it still does get detected though and if I put items under allowed pickup types then you can't pick up the health. I have the item definition there because the health not working the other way.
The health with the below solution but the pistol doesn't work with that solution. So how can I make both health and weapons get picked up by pressing the f key?

PickupAbility.PNG
 
Are you only wanting to play the pickup ability with the pistol? Or any item type? On the Item Pickup component make sure you do not have pickup on trigger enter enabled.
 
Are you only wanting to play the pickup ability with the pistol? Or any item type? On the Item Pickup component make sure you do not have pickup on trigger enter enabled.
I want to be able to press an action key to pick up the health as well as the weapon, but it only works on just the 1 though. if I enable the health to be picked up with the action key, when I try with the weapon it doesn't work because if I put everything to be picked up the weapon gets picked up with the action key but the health won't work. But if I just put health and other on the allowed types the health works but the weapon doesn't even though the raycast detects both objects. On both pickups the trigger enabled is disabled. But on the health even though it's disabled it still can get picked up regardless of that.
 
The image below won't allow the weapon to get picked up. But the health can get picked up.
PickupAbility1.PNG

This Image below will not allow the health to get picked up. But the weapon gets picked up.
PickupAbility2.PNG
 
The health pickup is separate from the Pickup Item ability. We don't have any built in functionality to have the health be picked up on a button press.

In the version 2 demo scene when I change the Item Pickup component to not pickup on a trigger and also the Pickup Item ability to require a button press it works. You could try comparing your setup to that.
 
The health pickup is separate from the Pickup Item ability. We don't have any built in functionality to have the health be picked up on a button press.

In the version 2 demo scene when I change the Item Pickup component to not pickup on a trigger and also the Pickup Item ability to require a button press it works. You could try comparing your setup to that.
It doesn't work for both health and weapon. I tried it on the demo scene.
 
If I change the pickup ability in the demo scene to start with a button down then the assault rifle isn't picked up until I press the F key. In order to have the health pack picked up on a button press you'll need to subclass the Health Pickup class and add that functionality.
 
Top