Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_npc_castle_cliff_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 1 && !d_ex() && i_ex(obj_npc_room))
2
{
3
    if (!sfx)
4
    {
5
        sfx = true;
6
        snd_play(snd_hypnosis);
7
    }
8
    sinerx = 0;
9
    sinery = 0;
10
    siner_amplitude0 += 0.2;
11
    siner0 += 0.2;
12
    var sinmove_x = sin(siner0) * siner_amplitude0;
13
    sinerx += lengthdir_x(sinmove_x, siner_direction0);
14
    sinery += lengthdir_y(sinmove_x, siner_direction0);
15
    var xpos = sinerx;
16
    var ypos = sinery;
17
    siner1 += siner_add1;
18
    var sinmove_y = cos(siner1) * siner_amplitude1;
19
    sinerx += lengthdir_x(sinmove_y, siner_direction1);
20
    sinery += lengthdir_y(sinmove_y, siner_direction1);
21
    xpos = sinerx;
22
    ypos = sinery;
23
    with (obj_npc_room)
24
    {
25
        x += xpos;
26
        y = (y + ypos) - 6;
27
    }
28
    if (obj_npc_room.y <= -100)
29
        con = 99;
30
}
31
if (remove_shine)
32
{
33
    remove_shine = false;
34
    if (shine != -4)
35
    {
36
        with (shine)
37
            instance_destroy();
38
    }
39
}