I need help trying to input number’s into the coding here is what I’m trying to do:
If you press the number one it will choose a weapon. If you press the number one again it will choose another weapon. The cycle continues as you keep pressing the number one. If you guys could show me what code could make this happen that would be awesome.
void Update()
{
if (Input.GetKeyDown(KeyCode.Alpha1))
{
CurrentPlayer.SelectNextWeapon();
}
}
Where
CurrentPlayer.SelectNextWeapon();
is a custom function that selects next weapon. Obviously I can’t write the code in that function since I don’t know how your game stores and handles weapons and loadouts.