Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_climb_destructableclimbarea_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 1)
2
{
3
    timer++;
4
    if ((timer % 2) == 0)
5
    {
6
    }
7
    if ((timer % 8) == 0)
8
    {
9
    }
10
    var endme = false;
11
    var target = 27;
12
    if (extflag == "susie")
13
        target = 731;
14
    if (always_break_on_timer)
15
    {
16
        with (climbarea)
17
        {
18
            if (!place_meeting(x, y, target))
19
            {
20
                if (!other.only_break_upwards || target.y < y)
21
                {
22
                    other.con = 2;
23
                    endme = true;
24
                }
25
                else
26
                {
27
                    other.con = 0;
28
                }
29
            }
30
        }
31
    }
32
    if (dangerous && timer >= dangertime)
33
    {
34
        con = 2;
35
        with (target)
36
            fallingcon = 1;
37
        endme = true;
38
    }
39
    if (endme)
40
    {
41
        safe_delete(climbarea);
42
        if (animation_idx > 0)
43
        {
44
            with (obj_rotating_tower_animation)
45
            {
46
                if (index == other.animation_idx)
47
                {
48
                    targetx = other.x + 20;
49
                    targety = other.y - 20;
50
                    con = 2;
51
                    break;
52
                }
53
            }
54
            instance_destroy();
55
        }
56
        else
57
        {
58
            snd_play(snd_heavyswing);
59
            if (i_ex(obj_rotating_tower_controller_new) && gravity != 1)
60
            {
61
                with (obj_rotating_tower_controller_new)
62
                    set_tile_sprite_ext(other, spr_nothing, false);
63
            }
64
            
scr_doom
scr_doom

function
scr_doom(arg0 = id, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; persistent = arg0.persistent; } }
(id, 30);
65
            gravity = 1;
66
        }
67
    }
68
}