Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_arcade_ghost_Step_0

(view raw script w/o annotations or w/e)
1
if (arc_enemy_death == false)
2
{
3
    switch step
4
    {
5
        case 0:
6
            if (wait_timer > 0)
7
                wait_timer--
8
            else
9
                step = 1
10
            break
11
        case 1:
12
        case 2:
13
        case 3:
14
            if (wait_timer > 0)
15
                wait_timer--
16
            else
17
            {
18
                step++
19
                instance_create(x, (y + 12), obj_arcade_enemy_bullet)
20
                wait_timer = 15
21
            }
22
            break
23
    }
24
25
}
26
else
27
{
28
    switch step
29
    {
30
        case 0:
31
            arc_enemy_hsp = 0
32
            if (image_index >= (image_number - image_speed))
33
            {
34
                image_speed = 0
35
                step++
36
            }
37
            break
38
        case 1:
39
            arc_enemy_hsp = 5
40
            step++
41
            break
42
    }
43
44
}
45
if (!arc_enemy_hit)
46
    x += arc_enemy_hsp
47
if (x != clamp(x, 0, 260))
48
    instance_destroy()