Undertale script viewer

← back to main script listing

gml_Object_obj_risespearbulletgen_Step_0

(view raw script w/o annotations or w/e)
1
if (global.turntimer < 1)
2
{
3
    with (obj_risespearbullet)
4
        deactivate = 1;
5
    instance_destroy();
6
}
7
if (global.turntimer < 4)
8
{
9
    alarm[0] = -1;
gml_Object_obj_risespearbulletgen_Alarm_0.gml

if (global.turntimer > 8) { xset = floor(random(3)); if (xset == xsetmem) xset += 1; if (xset == 3) xset = 0; xsetmem = xset; g = instance_create(obj_lborder.x + (xset * 23), obj_dborder.y, obj_risespearbullet); g.type = offchoice; alarm[0] = global.firingrate; }
10
    with (obj_risespearbullet)
11
        deactivate = 1;
12
    if (instance_exists(obj_undyneboss))
13
    {
14
        if (obj_undyneboss.order == 9 || obj_undyneboss.order == 15)
15
        {
16
            global.turntimer = 30;
17
            if (obj_undyneboss.order == 9)
18
                obj_undyneboss.lesson = 8;
19
            if (obj_undyneboss.order == 15)
20
                obj_undyneboss.lesson = 13;
21
            if (obj_undyneboss.order == 24)
22
                obj_undyneboss.lesson = 22;
23
            with (obj_undyneboss)
24
                event_user(1);
25
            with (obj_risespearbullet)
26
                deactivate = 1;
27
        }
28
    }
29
    if (instance_exists(obj_undyne_ex))
30
    {
31
        if (obj_undyne_ex.order == 6)
32
        {
33
            global.turntimer = 30;
34
            with (obj_undyne_ex)
35
alarm[11]
36
            if (obj_undyne_ex.order == 6)
37
                obj_undyne_ex.lesson = -8;
38
            with (obj_undyne_ex)
39
                event_user(1);
40
            with (obj_risespearbullet)
41
                deactivate = 1;
42
        }
43
    }
44
    instance_destroy();
45
}