I wonder if anyone can point me in the right direction.
I am new to all this and i’m currently working through my first game, which is a 2d top down shooter.
I had followed YouTube guides for a shooting script, however, this script only allowed for 1 gun for the player. I want to split this shooting script into a WeaponsBehaviour script for shooting and a WeaponsAttribute script for what all the weapon variables (force, bullet type sprite and sound etc)
In my head i wanted to have the oprtion of several guns (only one at a time) and i seen this as the following:
- WeaponBehaviour (basically a shooting script) assigned to player
- Current weapon script assigned to player (i can drag weapon objects into this or/and assign by weapon array number)
- An array list of weapons (at the moment this is just for me to drag weapon objects in not really sure what to do with this)
- WeaponAttributes script assigned to weapons (this is to make weapons behave differntly)
Could someone please confirm if i am on hte right track as im getting errors when trying to change the WeaponBehaviour sript to pull in the variables from the WeaponsAttribute script.
hope that makes sense, please let me know if your require any further information.