- Home /
Fairly Simple FPS Inventory HELP?
Hello all, I’ve never made one of these posts but I’ve been hitting a brick wall for over week now and I’m becoming frustrated. So, I'm making just a fairly bare-bones but presentable round based zombie fps game. (Similar to the zombies mode in COD) I have my player controller script to my liking and now I’m on to my inventory and the act of picking up weapons, switching weapons, tracking ammo, etc. I have followed countless tutorials. And those are great and I’m sure they work for other people just not my case. I’ve seen people use an array with scriptable objects and I’ve tried to follow their guides but to no avail. I have also done some research on implementing these arrays as an inventory and tracking game objects using arrays, but I haven’t found a modular and simpler way. I’m using an asset that features realistic hands with realistic guns and animations, these guns aren’t separate from the hands so I can’t just change the weapon, I would have to substitute the prefab of the arms and gun when I switch. I just want a basic inventory where I can switch weapons (with the animations) be able to track which gun im using and change the animations to go with that gun, and be able to pick guns up and store them. Again just think of how the weapon switching in COD zombies works. If anyone could spare some knowledge on how to configure arrays and scriptable objects for these simple purposes, or offer a easier alternative i would greatly appreciate u. I am not asking for someone to make an entire inventory solution for me of course I just wanted to know if there’s any like minded people who are informed and would be able to share some knowledge, thanks guys<3
Just for reference - im 16, I have been coding and using Unity for prolly 4-5 months, but i just recently started trying to do things without tutorials.
Answer by Skourge · Mar 07 at 04:21 AM
Have you followed this series?
https://www.youtube.com/watch?v=Cf-3SPL1IMI&t=830s&ab_channel=NikNax
He doesn't use scriptable objects but I managed to get all of this working with his tutorial, for switching weapons, I drag my weapon to my hotbar and press 1 (if in slot 1) and it will switch to my weapon.
I'm sure you've probably stumbled across this tutorial already since you've scoured the internet for a solution, thought i'd post it anyways just in case you haven't.
If I had the answer I'd tell you but I've only been coding for roughly a month lol
Goodluck!
Thank you so much for your reply, I didn’t follow this method but I have seen the video, I will follow it today after school and post an update. Thank you - Braden
Your answer
Follow this Question
Related Questions
Inventory UI buttons not working 1 Answer
How to start an inventory system? 2 Answers
Toggle Inventory script 1 Answer
[C#] Grouping variables 1 Answer
Common script 1 Answer