Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_queenart_mona_Step_0

(view raw script w/o annotations or w/e)
1
if (decorative == true)
2
    active = 0;
3
if (con == 0)
4
{
5
    image_index = 0;
6
    timer++;
7
    threshold = 60;
8
    if (type == 0)
9
        threshold = 60;
10
    if (type == 1)
11
        threshold = 20;
12
    if (type == 2)
13
        threshold = 35;
14
    if (type == 3)
15
        threshold = 15;
16
    if (timer >= threshold && active == 1)
17
    {
18
        con = 1;
19
        timer = 0;
20
    }
21
}
22
if (con == 1)
23
{
24
    timer++;
25
    flashamt = sin(timer / 2);
26
    if (flashamt < 0 && timer >= 5)
27
    {
28
        con = 2;
29
        timer = 0;
30
    }
31
}
32
if (con == 2)
33
{
34
    image_index = 1;
35
    timer++;
36
    if (type == 0)
37
        flameangle = -25;
38
    if (type == 1)
39
        flameangle = -30;
40
    if (type == 2)
41
        flameangle = -140;
42
    if (type == 3)
43
        flameangle = -25;
44
    if (type == 4)
45
        flameangle = -15;
46
    flameanglemax = abs(flameangle);
47
    flameangle = sin(timer / 4) * flameanglemax;
48
    if (movetype == 1)
49
        flameangle = 0;
50
    rate = 4;
51
    if (type == 1)
52
        rate = 3;
53
    if (type == 2)
54
        rate = 1;
55
    if (type == 3)
56
        rate = 3;
57
    if (type == 4)
58
        rate = 3;
59
    if ((timer % rate) == 0)
60
    {
61
        if (scr_onscreen_tolerance
scr_onscreen_tolerance

function scr_onscreen_tolerance(arg0, arg1) { obj = arg0; spacer = arg1; if ((obj.x + obj.sprite_width + spacer) < camerax() || (obj.x - spacer) > (camerax() + 640) || (obj.y + obj.sprite_height + spacer) < cameray() || (obj.y - spacer) > (cameray() + 480)) return false; else return true; }
(id, -40))
62
        {
63
            if (type != 4)
64
            {
65
                with (bossid)
66
                    flamesfx = 1;
67
            }
68
        }
69
        flame = instance_create(x + 34, y + 40, obj_queenartfire);
70
        flame.image_xscale = 0.2;
71
        flame.image_yscale = 0.2;
72
        flame.growamt = 0.2;
73
        flame.image_alpha = 3;
74
        flame.fadespeed = 0.2;
75
        flame.direction = 270 + flameangle;
76
        flame.speed = 15;
77
        flame.friction = 1;
78
        flame.vspeed += 8;
79
        if (type == 2)
80
        {
81
            flame.fadespeed = 0.15;
82
            flame.vspeed -= 6;
83
            flame.speed += 5;
84
        }
85
        if (type == 3)
86
        {
87
            flame.vspeed -= 6;
88
            flame.speed += 3;
89
            flame.fadespeed = 0.16;
90
        }
91
        if (type == 4)
92
        {
93
            flame.damage = 60;
94
            flame.vspeed = 20;
95
            flame.fadespeed = 0.12;
96
        }
97
    }
98
    threshold = 57;
99
    if (type == 1)
100
        threshold = 30;
101
    if (type == 2)
102
        threshold = 18;
103
    if (type == 3)
104
        threshold = 15;
105
    if (timer >= threshold && type != 4)
106
    {
107
        image_index = 0;
108
        con = 0;
109
        timer = 0;
110
    }
111
}
112
if (con == 3)
113
{
114
    flashamt = 0;
115
    if (type == 4)
116
        con = 2;
117
    laughtimer++;
118
    if ((laughtimer % 9) == 0)
119
        image_index = 1;
120
    if ((laughtimer % 9) == 3)
121
        image_index = 0;
122
    if (laughtimer >= 40)
123
    {
124
        timer = 0;
125
        image_index = 0;
126
        laughtimer = 0;
127
        con = 0;
128
    }
129
}
130
if (movetype == 1)
131
{
132
    movesiner++;
133
    x += (sin(movesiner / 9) * 9);
134
}
135
if (instance_exists(obj_musictracker))
136
    trackpos = obj_musictracker.trackpos;
137
if (trackpos >= 18.862 && trackpos <= 18.902)
138
    con = 3;
139
if (id == bossid && con != 3)
140
{
141
    if (flamesfx == 1)
142
    {
143
        snd_stop(snd_rocket_mona);
144
        flame = snd_play_pitch(snd_rocket_mona, 1.5);
145
        snd_volume(flame, 0.35, 0);
146
        flamesfx = 0;
147
    }
148
    if (dingsfx == 1)
149
    {
150
        snd_stop(snd_spearappear);
151
        snd_play_pitch(snd_spearappear, 0.9);
152
        dingsfx = 0;
153
    }
154
}