Hmm I guess I found something similiar. Didn´t test it yet but from looking around in the forums I got this idea (first off player moves from alone to the right):
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.image = "myimage.png";
}
function onPlayerTouchsme() {
if (player.dir = 2) {
if (playerx in |getimgwidth( this.image)| && playery in |getimgheight( this.image)|) {
settimer("0.1");
}
if (!playerx in |getimgwidth( this.image)| && !playery in |getimgheight( this.image)|) {
settimer("0");
}
}
}
function onTimeout() {
playerx += 1;
settimer("0.1");
}
EDIT: added if the player isn´t inside the picture