So I currently have this script I'm working with
(($gameVariables.value(crook x)+1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)-1) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)-1) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)-1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)-1) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)-1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)+1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)+1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)+1) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)+1) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)-1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)+1) === $gameVariables.value(guard y));
To put it simply, what this does, is, (When put into a conditional branch for the guard) activates an event whenever the crook comes within one square of the guard.
But what if I want to have multiple crooks? Do I need a conditional event for each crook? Or is it possible, that I could have the guard check for all crooks on the map. So in other terms:
Could I get the guard event to recognize any crook event that it came into contact with, not just one particular specific event?
(($gameVariables.value(crook x)+1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)-1) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)-1) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)-1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)-1) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)-1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)+1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)+1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)+1) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)+1) === $gameVariables.value(guard y)) || (($gameVariables.value(crook x)-1) === $gameVariables.value(guard x) && ($gameVariables.value(crook y)+1) === $gameVariables.value(guard y));
To put it simply, what this does, is, (When put into a conditional branch for the guard) activates an event whenever the crook comes within one square of the guard.
But what if I want to have multiple crooks? Do I need a conditional event for each crook? Or is it possible, that I could have the guard check for all crooks on the map. So in other terms:
Could I get the guard event to recognize any crook event that it came into contact with, not just one particular specific event?