Hi, I'm trying to get an object to do a patrol movement.
The idea is: It goes up until it reaches "this y value", then turns around, goes down until "this other y value" and so on.
My idea is somthenig like this, setting this code into the object's own script.
var topy = 0 # i.e.
var lowy = 200
var dir = 1
if dir == 1:
movelocaly(-10)
if dir == 0:
movelocaly(10)
if (my own Y value) == topy:
dir = 0
if (my own Y value) == lowy:
dir = 1
My problem is that I'm not being able to find an action to get "my own Y value". I need the object to detect its own coordinates so it can turn around when needed.
Hope to have been clear enough, thanks in advance.