Hey I'm back with another question. If you ever played God of War or Devil May Cry you noticed that you can switch weapons in game, well thats what im trying to do but ran into a bit of a snag.
Now I'm trying to use an array because for some reason when i try and use a container my game crashes. and I already set up an global variable that I can compare with the index of the array. ex. weaponTracker = 1 which is the 2nd weapon in the array.
My problem is I don't know how to switch that 2nd weapon with the 1st weapon, which would make the 2nd weapon in use instead of the 1st (primary).
how do I allow the player to switch weapons ingame using an array that holds references to other weapons.
Please and thank you for helping me with this problem. I know their is a simple way of doing this but it eludes me as of right now
Develop games in your browser. Powerful, performant & highly capable.