Hi all,
Im having a problem with a small script code.
I want an event to change self switch A to true, when the player is nearby.
So I wrote:
var px = $gamePlayer.x;
var py = $gamePlayer.y;
var ex = $gameMap.event(32).x;
var ey = $gameMap.event(32).y;
if(px <= (ex+5) && px >= (ex-5) && py <= (ey+5) && py >= (ey-5)) {$gameSelfSwitches.setValue([1,32,'A'], true};
But is just doesnt seem to work, maybe somebody knows whats up.
Thnk you,
Deabt
Im having a problem with a small script code.
I want an event to change self switch A to true, when the player is nearby.
So I wrote:
var px = $gamePlayer.x;
var py = $gamePlayer.y;
var ex = $gameMap.event(32).x;
var ey = $gameMap.event(32).y;
if(px <= (ex+5) && px >= (ex-5) && py <= (ey+5) && py >= (ey-5)) {$gameSelfSwitches.setValue([1,32,'A'], true};
But is just doesnt seem to work, maybe somebody knows whats up.
Thnk you,
Deabt