Ok so this will be a hard one im not gonna lie, but any help at all would be appreciated because I have been stumped for days on this.
So the issue im running into is that when I empty a weapon of all its ammo, (setting its ammo integer to zero) I cannot shoot again until I swap weapon slots, after which I have no trouble firing and everything works as it should.
Blueprints below. Inventory system works by setting an array variable to correlate with with an index to swap between the two weapon slots. If you need/want full inventory blueprints Id be happy to show them.
Again, any help at all would be greatly appreciated, thank you in advance.
Sorry just want to clarify what you mean in 5. when you refer to playercharacter(0)? How do I fix this. Sorry for my ignorance, first multiplayer game for me.
so the key to multiplayer is everything should basically run on server, especially something like CheckAmmo (you can still have local prediction) so when you query GetPlayerCharacter(0) you’re asking who is the first character, and since you’re asking on server it should (but not always) return the server player. this means if player 2 trys to check his ammo hes checking against player 1
you need to pass in a reference to the weapons ‘Owner’ ie playercharacter.
you can do this when you spawn|equip|fire the weapon for example