I’m pretty new to c++ programming in ue4. I’m having some trouble:
I initialized Shotgun and RPG in the character.h.
In the constructor, I set Shotgun as False and RPG as true.
this is the constructor, right?
I then made it so when I press 2, it sets Shotgun as true and RPG as false.
But when I press 2, everytime I fire afterwards, RPG is still coming as true and Shotgun as false.
When I press 2, I set shotgun to true and I check if shotgun is true. If so, I print out “shotgun is true”, so I prove that shotgun is true. I also set RPG to false.
However, when I press LMB, I check if RPG, and if so, it prints “not”. (to symbolize that shotgun is false, which I also verified.)
Is it a problem with how I’m initializing it?