Hello, I’m making an FPS game, (right now just working on the player/gun, etc.) and I’m having a bit of a problem. I’m trying to make it so that the player can manually reload using the R key but only if the ammo is less than 7. I tried to do the following:
//This is in the Update Function:
if(Input.GetKeyDown(KeyCode.R && AmmoLeft < 7)) {
Invoke("ManualReload", 0.5);
}
//Then in the ManualReload function:
function ManualReload() {
//All of the reloading is here in the script
}
I’m not sure where I’m going wrong with this, can anyone help?
Thanks