Question about bools

I’m confused about using bool this way, compared to what we did in Bulls and Cows. In Bulls and Cows, we where having the bool return true or false based on if the player pressed Y or N, and then quitting or restarting based on that .

Here we are just declaring a bool, running a bunch of code inside it and telling it to return true.

Question:
Is it just a way to use the results from the code inside the bool, in the if statement in the method above? Like “If this code is working, do this”?

I think I understand the big picture, I just get overwhelmed by the details and the amount of text. I think Its all about getting the right value into HitLocation by passing it through various methods inside bools.

That’s what we are using the bool return type for, yes. If there is a hit result that function would return true else false.
The end of writing this function comes at “Using LineTraceSingleByChannel”. So if you are still having trouble just understanding just give a shout :slight_smile:

Privacy & Terms