Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_gerson_swing_down_old_Step_0

(view raw script w/o annotations or w/e)
1
timer++;
2
if (timer > 3 && sprite_index == spr_gerson_swing_down)
3
    image_index += 0.5;
4
if (timer == 5)
5
    snd_play(motor_upper_quick_mid);
6
if (timer == 7)
7
    snd_play(motor_swing_down);
8
if (sprite_index == spr_gerson_swing_down && image_index > 3.5)
9
{
10
    sprite_index = spr_gerson_swing_down_loop;
11
    image_index = 0;
12
    image_speed = 0;
13
}
14
if (sprite_index == spr_gerson_swing_down && image_index > 1.5 && con == 0)
15
{
16
    con = 1;
17
    y += 40;
18
    vspeed = 45;
19
    friction = 7;
20
}
21
if (con == 1 && vspeed < 12)
22
{
23
    friction = 2;
24
    image_alpha -= 0.2;
25
    if (image_alpha < 0)
26
        instance_destroy();
27
}
28
if (y > (cameray() + cameraheight()))
29
    instance_destroy();
30
if (fakeout == 1 && sprite_index == spr_gerson_swing_down && image_index >= 2.5)
31
{
32
    gers = instance_create(x + 56, y + 108, obj_gerson_teleport);
33
    instance_destroy();
34
}