#I Am A Moron Please Help

1 messages · Page 1 of 1 (latest)

odd dragon
#

Im trying to make a looter shooter with random guns, I am trying to make an inventory system but I have no idea where to start, any tips?

#

DETAILS:

#

I am using a system like this:

#

Where the currently selected weapon slot is active while the others are not

#

and the guns are parented to the slot

red eagle
#

How are the guns different? Do they have IDs? Different scripts?

odd dragon
#

they are different prefabs

red eagle
#

Yes, so, how are they different?

#

How do you differentiate between your guns

odd dragon
#

I have yet to differentiate them

#

As i have no idea what I am doing

red eagle
#

Do that then. Use an ID, or different script, whatever

odd dragon
#

I just need a hole to start drilling

#

yknow

red eagle
#

Then when you pick up a gun, check that identifier to know which gun to make active

odd dragon
#

how would I do that?

#

i can make an array with different numbers

#

but i want to randomize the guns later on

#

so that would not work

red eagle
#

If you can change the gun that is in each slot, you should attach the identifier to the gun itself

#

Like i said, an id. Like.. gunType or something

odd dragon
#

So if weapon = 3 then it is the shotgun

#

?

red eagle
#

I guess?

odd dragon
#

ill try that

red eagle
#

Basically to start with, just create a way to identify between your guns

odd dragon
#

ok

#

you ahve any idea how to identify them?

#

@red eagle

odd dragon
#

i am using .txt files with nubmers

#

to id guns

red eagle
#

Uh... why

odd dragon
#

Read the thread title

red eagle
#

Okay nvm then. Maybe look up a tutorial

odd dragon
#

i did that for 3 hours

#

nothing

#

✅ Get the Project files and Utilities at https://unitycodemonkey.com/video.php?v=isAmoM3RPEI
Let's make a UI Window so we can Drag Weapons and Items into various Slots to Equip them!

Character Portrait Window
https://www.youtube.com/watch?v=_DjR2O8EKPA

Simple Inventory
https://www.youtube.com/watch?v=2WnAOV7nHW0

Simple Drag Drop
https://www.y...

▶ Play video
#

this looks good