Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_socialmedia_avatar_Step_0

(view raw script w/o annotations or w/e)
1
if (y < (cameray() + 290))
2
    depth = obj_heart.depth - 2;
3
if (y > (cameray() + 290))
4
    depth = obj_heart.depth + 100;
5
if (isqueen)
6
{
7
    if (queencon == 0)
8
    {
9
        sprite_index = spr_q_socialface_queen;
10
        x = camerax() + 640;
11
        hspeed = -4;
12
        queencon = 1;
13
    }
14
    if (queencon == 1)
15
    {
16
        if (x <= xstart)
17
        {
18
            with (obj_wordbullet)
19
            {
20
                timer = -900;
21
                image_alpha = 0.5;
22
                active = 0;
23
                speed = 0;
24
                gray = 1;
25
            }
26
            with (obj_socialmedia_avatar)
27
            {
28
                hspeed = 0;
29
                vspeed = 0;
30
                image_speed = 0;
31
                angrycon = 1;
32
            }
33
            vspeed = 0;
34
            hspeed = 0;
35
            snd_play(snd_queen_laugh_0);
36
            snd_stop(snd_crowd);
37
            redword = instance_create(x - 40, y - 10, obj_wordbullet);
38
            redword.queenword = 1;
39
            redword.wordchoice = stringsetloc(
DRAMA
"DRAMA", "obj_socialmedia_avatar_slash_Step_0_gml_36_0"
);
40
            redword.destroyonhit = 0;
41
            redword.hspeed = -4;
42
            queencon = 2;
43
        }
44
    }
45
    if (queencon == 2 && angrycon == 2)
46
    {
47
        sprite_index = spr_q_socialface_queen_laugh;
48
        image_speed = 0.25;
49
        snd_play(snd_crowd);
50
        snd_loop(snd_crowd);
51
        snd_pitch(snd_crowd, 1);
52
    }
53
    angrycon = -1;
54
}
55
else if (chosen_face == 8)
56
{
57
    exit;
58
}
59
if (angrycon == 0)
60
{
61
    timer++;
62
    if (timer >= (19 - myhspeed))
63
    {
64
        times++;
65
        if (times >= offset)
66
        {
67
            times = 0;
68
        }
69
        else
70
        {
71
            side = sign(obj_growtangle.x - x);
72
            word = instance_create(x - (20 * side), y - 10, obj_wordbullet);
73
            word.vspeed = vspeed;
74
            if (instance_exists(obj_growtangle))
75
                word.hspeed = myhspeed * side;
76
        }
77
        timer = 0;
78
    }
79
    if (y > (cameray() + 310))
80
    {
81
        image_alpha -= 0.1;
82
        if (image_alpha <= 0)
83
            instance_destroy();
84
    }
85
}
86
if (angrycon == 2)
87
{
88
    sprite_index = spr_queen_pfps_mad;
89
    image_speed = 0.25;
90
    image_blend = c_red;
91
    timer = random(30);
92
    angrycon = 3;
93
}
94
if (angrycon == 3)
95
{
96
    timer++;
97
    if (timer >= 22)
98
    {
99
        word = instance_create(x - (20 * side), y - 10, obj_wordbullet);
100
        word.depth = depth - 1;
101
        with (word)
102
        {
103
            angry = 1;
104
            direction = point_direction(x, y, obj_heart.x + 10, obj_heart.y + 10) + random_range(30, -30);
105
            image_angle = direction;
106
            speed = 7;
107
        }
108
        timer = -random(4);
109
    }
110
}