if (obj_mainchara.y < (x - 40))
{
path_speed = 0;
direction = 180;
image_speed = 0;
image_index = 0;
t = 0;
}