I had to do it this way for the players on Era-
HTML Code:
function onTimeout() {
temp.timer = 1;
if (player.x in |this.x - 15, this.x + 15| &&
player.y in |this.y - 10, this.y + 15|)
temp.timer = 0.05;
if ((player.x + 1.5) in |this.x + 1.5, this.x + (this.width - 1.5)| &&
player.y in |this.y + 3, this.y + 6|) {
temp.dir = (player.dir == 0? 2: (player.dir == 2? 0: player.dir));
temp.x = player.x;
temp.y = this.y + 4 - ((player.y - thiso.y) - 2);
temp.ani = player.ani;
with (findimg(200)) {
this.x = temp.x;
this.y = temp.y;
if (this.ani != temp.ani)
this.ani = temp.ani;
this.layer = 2;
this.dir = temp.dir;
playerlook = false;
actor.head = playero.head;
actor.body = playero.body;
actor.colors[0] = playero.colors[0];
actor.colors[1] = playero.colors[1];
actor.colors[2] = playero.colors[2];
actor.colors[3] = playero.colors[3];
actor.colors[4] = playero.colors[4];
actor.attr[1] = playero.attr[1];
actor.shield = playero.shield;
}
} else {
hideimg(200);
}
setTimer(temp.timer);
}