Understanding booleans

so theres this one thing ive never understood when i saw bools in code and its this. If i type in

bool isActice;

what does that mean? is it true by default if you dont set it up as Bool isActive = true;?
this is something i see alot and its gotten me confused like for example.

the variable was never set to true or false so the only logical thing i can tell from it is that when you make a boolean variable the variable is true by default unless set to false others wise. Are Booleans true by default? i know the answer is no but im just not understand how this piece of code makes anysense from line 76 to 86. Whats the difference between SetGunsActive(true); and SetGunsActive(false); and how is the True one calling the method?

Edit: I understand it now.

i didnt understand it because i thought it had to be true or false/ one or the other in order to call the method because thats how im used to seeing bools but i see now that the variable isActive can be accessed by both of them and its value of true and false is determined by whether ur hitting Fire or not lol a little slow sometimes but im getting there.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms