Hi!
I am trying to activate this event, when my player goes near it.
I have set up variables:
variable1 = player x (on map)
variable2 = player y (on map)
variable3 = event x (on map)
variable4 = event y (on map)
I want to make a script for conditional branch which would subtract one variable from another and gives absolute number(if answer is ,,-'' it makes it positive)
I tried doing it this way. $game_variables[1] - $game_variables[3] = 3.abs
but it activates even when this isn't true. Same method would go for y coordinates.
I tried using a proximity detection script, but that caused me errors, maybe because I have other scripts in my game as well, that might be interrupting each other.

I am trying to activate this event, when my player goes near it.
I have set up variables:
variable1 = player x (on map)
variable2 = player y (on map)
variable3 = event x (on map)
variable4 = event y (on map)
I want to make a script for conditional branch which would subtract one variable from another and gives absolute number(if answer is ,,-'' it makes it positive)
I tried doing it this way. $game_variables[1] - $game_variables[3] = 3.abs
but it activates even when this isn't true. Same method would go for y coordinates.
I tried using a proximity detection script, but that caused me errors, maybe because I have other scripts in my game as well, that might be interrupting each other.
