If I got given a penny for every time someone doesn’t use code tags , I’d be rich.
Please use code tags when posting code, the community will appreciate it.
You can always edit your post afterwards if you’ve forgotten it.
an if statement is with a lower case i.
if(condition)
{
// execute
}
else
{
// condition was not met. Do something else.
}
LookRight = true
is an assignment. You’re assigning the value true
to LookRight
. That’s not a condition.
A condition would be ==
which is equals. is the left hand side equal to the right hand side?
In some cases you can shorthand this by just doing if(LookRight && inputMovement < 0)
which would be the same as if(LookRight == true && inputMovement < 0)