I’m learning about canvas by making a simple RPG.
I’m trying to make it so that if you walk into a certain area, it runs a function. So I used an if:
if (x<150, x>50, y<150, y>50) {
(code I want to execute)
}
But even when the statement is false, it’s still considered true. I want it so that all statements in the parentheses must be true for the code to execute. Any help?
Use
&&:Or to separate each part for readability:
To learn more, check out: