<undefined> 0 -1 0 0 <undefined> <undefined> 1 603 7 0 0 -1 2 self 0 0 1 ///Initialize hdist = 0; vdist = 0; mvspd = 4; facing = DOWN; boundary = instance_create(x, y, Boundary); image_speed = 0; inikey = ""; 1 603 7 0 0 -1 2 self 0 0 1 ///Destroy boundary too if(boundary != noone) { with(boundary) instance_destroy(); } 1 603 7 0 0 -1 2 other 0 0 1 ///Move x += sign(hdist) * mvspd; if(sign(hdist) > 0) { facing = RIGHT; } else if(sign(hdist) < 0) { facing = LEFT; } hdist -= sign(hdist) * mvspd; y += sign(vdist) * mvspd; if(sign(vdist) > 0) { facing = DOWN; } else if(sign(vdist) < 0) { facing = UP; } vdist -= sign(vdist) * mvspd; 1 603 7 0 0 -1 2 self 0 0 1 ///Carry wall around if(boundary != noone) { with(boundary) { x = other.x; y = other.y; } } 1 603 7 0 0 -1 2 self 0 0 1 ///Animate if(x != xprevious || y != yprevious) { image_speed = mvspd / 32 * 4; } else { image_speed = 0; image_index = 0; } if(facing == DOWN) { image_index = image_index % 4; } if(facing == LEFT) { image_index = image_index % 4 + 4; } if(facing == RIGHT) { image_index = image_index % 4 + 8; } if(facing == UP) { image_index = image_index % 4 + 12; } 0 0 0 0.5 0.100000001490116 0 0.100000001490116 0.100000001490116 0.200000002980232 -1 0