I'm using MV, and I need to check whether one variable is equal to another variable plus or minus one. In other words, I need to check (as an if statement) if variable1 = variable2+1 some times, and variable1 = variable2-1 other times. As far as I know there isn't a way to do this through basic event commands, so I'll need to use JS. The only way I can think to do this is making 3 versions of variable2, the basic one and two that are one more and one less than it, but with all the different situations that need their own version of variable2, that would result in way way more variables than I'd like to work with. Is there a script or something I could use?
($gameVariables.value(1) == $gameVariables.value(2) + 1) || ($gameVariables.value(1) ==
$gameVariables.value(2) - 1)