Learn Intermediate OOP by Building a Platformer Game - Step 78

Tell us what’s happening:

Your code so far

dont know the isue

if(keys.rightKey.pressed === true && isCheckpointCollisionDetectionActive === true){

}

You should have an if statement that checks if the right key was pressed and if the isCheckpointCollisionDetectionActive is true.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Learn Intermediate OOP by Building a Platformer Game - Step 78

Hi @GavinEscanilla!

The statements are already booleans, so you don’t need to add the === true part.

Here is an example:

// ✅ This already evaluates to `true`
if (keys.leftKey.pressed) {}

// ❌ So you don't need to add `=== true`
if (keys.leftKey.pressed === true) {}

If you remove both parts your code will pass.

Happy coding!

2 Likes

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