Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_queenvaseonwheels_Create_0

(view raw script w/o annotations or w/e)
1
image_speed = 0;
2
image_index = 0;
3
tiltAmount = 0;
4
t = 0;
5
xx = x;
6
increment = 2;
7
amplitude = 360;
8
type = 0;
9
if (
scr_sideb_get_phase
scr_sideb_get_phase

function
scr_sideb_get_phase()
{ var phase = 0; if (global.flag[916 snowgrave_fail] == 0) { if (global.flag[915 snowgrave_plot] > 0 && global.flag[915 snowgrave_plot] < 4) phase = 1; if (global.flag[915 snowgrave_plot] >= 4 && global.flag[915 snowgrave_plot] < 7) phase = 2; if (global.flag[915 snowgrave_plot] >= 7 && global.flag[915 snowgrave_plot] < 20) phase = 3; if (global.flag[915 snowgrave_plot] >= 20) phase = 4; } return phase; }
() > 2)
10
    type = 1;
11
con = 0;
12
timer = 0;
13
if (type == 1)
14
{
15
    sprite_index = spr_pipis_egg_bottomanchor;
16
    y -= 24;
17
}
18
image_speed = 0;
19
image_index = 0;
20
mySwatch = 0;
21
if (room == room_dw_mansion_east_2f_c && type == 0)
22
{
23
    if (t == 180)
24
    {
25
        mySwatch = instance_create(x + 20, y - 156, obj_swatch_potchaser);
26
        mySwatch.dir = "left";
27
    }
28
    else
29
    {
30
        mySwatch = instance_create(x - 20, y - 156, obj_swatch_potchaser);
31
        mySwatch.dir = "right";
32
    }
33
    mySwatch.target = id;
34
}
35
t = (t + increment) % 360;
36
shift = amplitude * dsin(t);
37
x = xx + shift;
38
going = "left";
39
tellspeed = 0;
40
startX = x;
41
active = true;
42
if (global.flag[544 encount_run_butlers] != 0 && type == 0)
43
{
44
    with (mySwatch)
45
        instance_destroy();
46
}