Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_queen_berdlywireattack_Step_0

(view raw script w/o annotations or w/e)
1
if (hangcon == 1)
2
{
3
    hangvspeed -= (1 * m);
4
    hangy += hangvspeed;
5
    if ((y + hangy) <= (__view_get(e__VW.YView, 0) + 60))
6
    {
7
        hangcon = 2;
8
        hangtimer = 0;
9
    }
10
}
11
if (hangcon == 2)
12
{
13
    hangy += hangvspeed;
14
    if (abs(hangvspeed) >= 0)
15
        hangvspeed *= 0.5;
16
    if (abs(hangvspeed) <= 1)
17
    {
18
        hangvspeed = 0;
19
        hangcon = 3;
20
    }
21
}
22
if (hangcon >= 1 && hangcon <= 3)
23
{
24
    if (xmovement_finished == 0)
25
    {
26
        x -= ((x - targetx) / (6 * m));
27
        if (x <= (targetx + 2))
28
        {
29
            x = targetx;
30
            xmovement_finished = 1;
31
        }
32
    }
33
}
34
if (hangcon == 3)
35
{
36
    if (xmovement_finished == 1)
37
        hangcon = 4;
38
}
39
if (hangcon >= 2 && hangcon < 5 && global.turntimer >= 30)
40
{
41
    hangsparktimer++;
42
    if (hangsparktimer >= 6)
43
    {
44
        hangsparktimer = 0;
45
        shootcount = 0;
46
        bullet[shootcount] = instance_create(x + hangx, y + hangy + 80, obj_queen_berdlyfeather);
47
        bullet[shootcount].damage = 5;
48
        bullet[shootcount].stretch = 0;
49
        bullet[shootcount].image_speed = 0.2;
50
        bullet[shootcount].hspeed = -3 + random(6);
51
        bullet[shootcount].depth = depth - 1;
52
        bullet[shootcount].vspeed = -9 + random(2);
53
        bullet[shootcount].gravity = 0.5;
54
    }
55
}
56
if (hangcon == 4)
57
{
58
    hangsiner += (1 * m);
59
    x += (sin(hangsiner / 12) * 3);
60
    if (global.turntimer <= 20)
61
        hangcon = 5;
62
}
63
if (hangcon == 5)
64
{
65
    hangy -= ((hangy - init_hangy) / (8 / m));
66
    if (hangy >= (init_hangy - 4))
67
        hangy = init_hangy;
68
    x -= (((x - remx) / (8 / m)) - 1);
69
    if (x >= (remx - 1))
70
        x = remx;
71
    if (hangy == init_hangy && x == remx)
72
    {
73
        hangcon = 0;
74
        sprite_index = spr_cutscene_25_berdly_plug;
75
    }
76
}
77
if (hangcon == 6)
78
{
79
}
80
81
enum e__VW
82
{
83
    XView,
84
    YView,
85
    WView,
86
    HView,
87
    Angle,
88
    HBorder,
89
    VBorder,
90
    HSpeed,
91
    VSpeed,
92
    Object,
93
    Visible,
94
    XPort,
95
    YPort,
96
    WPort,
97
    HPort,
98
    Camera,
99
    SurfaceID
100
}