Undertale Yellow script viewer
← back to main script listing
gml_Object_obj_npc_sleepo_z_Step_0
(view raw script w/o annotations or w/e)
1 |
y -= 1 |
2 |
if (x_spd < 6) |
3 |
x_spd += 0.01 |
4 |
if (x_dir == 1) |
5 |
{ |
6 |
x += x_spd |
7 |
if (round(x) >= x_max) |
8 |
{ |
9 |
x_dir *= -1 |
10 |
x_spd = 0.1 |
11 |
} |
12 |
} |
13 |
else if (x_dir == -1) |
14 |
{ |
15 |
x -= x_spd |
16 |
if (round(x) <= x_min) |
17 |
{ |
18 |
x_dir *= -1 |
19 |
x_spd = 0.1 |
20 |
} |
21 |
} |
22 |
if (y < (ystart - 20)) |
23 |
{ |
24 |
draw_alpha -= 0.025 |
25 |
if (draw_alpha <= 0) |
26 |
instance_destroy() |
27 |
} |