how to code a easy reload weapon system?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By thoma

How can you make a reload weapon system for a 2D character that has spare mag, a fixed number of ammo in the mag and you can only reload if you press a input.How would you proceed to make it ?

:bust_in_silhouette: Reply From: MagnusS

It’s very difficult to answer such a question as it’s basically a variation of “How do I make the next Call of Duty?”

That being said I would probably start by making a walking character. The next step would be the ability to shoot bullets. Afterthis is working you can add some kind of reload mechanic. And then last but not least you add an actual weapon, some shoot and reload animations and a magazin+bullet counter.

The exact order is not that important. You could easily first implement the animations and then the shooting logic. What is important is tat you split your task into tiny subtasks. These subtasks should be small, well defined and easy for you to implement. There shouldbe plenty of tutorials for every single oneof those subtasks.

i got problems at switching guns and picking them up from ground.

ProXFox | 2019-03-03 02:42