Runtime Pickup

Serious_Adam

New member
QUESTION 1 TUTORIAL

Ive followed the video and the written tutorial for these .

When i put my pickup into the world i get these errors on play .


then on stop i get this.....
1550955053993.png
I saw another thread about someone reinstalling unity for the solution Below:

https://www.opsive.com/forum/index.php?threads/problem-with-runtime-pickup.703/

but i dont think thats the solution especially in the demo scene i am able to have pickup weapons lying on the ground.

What could be the issue here?

I see in that article JUSTIN says that

1. Add a base object to the run time pickup.
2. Create the base object ahead of time by following the normal item setup video and then removing just the actual item. This will keep the base object (the arms) so when the bow pickup is added it'll be able to find the base object.

im not quite sure how to add it to the run time pickup? what is i already have it on my character? is it inefficient to have a pair of arms for each weapon?

Thanks
 

Justin

Administrator
Staff member
Have you added the base object to the character? One way to do this is by first adding the item as a regular non-runtime pickup, and then removing that item through the Item Manager. When you remove the item the base object will still be on the character.
 

Serious_Adam

New member
Have you added the base object to the character? One way to do this is by first adding the item as a regular non-runtime pickup, and then removing that item through the Item Manager. When you remove the item the base object will still be on the character.

Alright so, I now have it where the item does not make errors on play.

When i press play and walk into a pickup object It will appear inside the Items gameobject (Sometimes)
I need something a bit more in detail on how this inventory system works....


In the tutorial it shows the character with NO weapons under the Items Gameobject in the scene.
(if i do remove those weapon Gameobjects from the Items Gameobjects i get an error....)


if i leave them objects on but remove the reference from the inventory before play the weapon is visible but one play it hides.
Then it will pick up the weapon.... but i would like to spawn with nothing.

How does the inventory system work?
How exactly do i remove items from my inventory and what is the proper way to do it?
Which scripts specifically do i remove items from?
Do I delete weapons from the Items Gameobjects in the scene? or do i keep them?
what if i don't want my character to have all the weapons right away?

I am very confused about the entire process honestly.
 
Last edited:

Justin

Administrator
Staff member
Once you have added the first person arms to your character you can remove the item through the Item Manager. You do not want to manually remove any GameObjects. This will then allow you to follow the tutorial since the item pickup system will be able to find the first person base object on the character.
 
Top