Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_climbstarter_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    var trig = 0;
4
    if (global.flag[23] && !i_ex(obj_climb_kris))
5
    {
6
        with (obj_climbstartertrig)
7
        {
8
            if (exitmarkerflag == other.exitmarkerflag)
9
            {
10
                if (myinteract == 3)
11
                {
12
                    trig = 10;
13
                    myinteract++;
14
                }
15
            }
16
        }
17
    }
18
    if (forcetoclimb == true)
19
        trig = 10;
20
    if (i_ex(obj_climb_kris))
21
        trig = -1;
22
    if (!global.flag[23])
23
        trig = -1;
24
    if (trig == 10)
25
    {
26
        forcetoclimb = false;
27
        con = 1;
28
        timer = 0;
29
    }
30
}
31
if (con == 1)
32
{
33
    timer++;
34
    if (timer == 1)
35
    {
36
        obj_mainchara.visible = false;
37
        obj_mainchara.freeze = true;
38
        obj_mainchara.cutscene = true;
39
        endtime = 8;
40
        if (i_ex(obj_rotating_tower_controller_new) && center_if_tower == 1)
41
        {
42
            with (obj_rotating_tower_controller_new)
43
                
scr_pan_lerp
scr_pan_lerp

function
scr_pan_lerp(arg0, arg1, arg2, arg3 = -1)
{ panner = instance_create(arg0, arg1, obj_panner); panner.panmax = arg2; panner.type = 1; if (arg3 != -1) panner.locktype = arg3; }
(tower_x - (0.5 * camerawidth()), cameray(), other.endtime);
44
        }
45
        with (obj_caterpillarchara)
46
        {
47
            visible = 1;
48
            image_alpha = 1;
49
            var me = id;
50
            with (obj_lerpvar)
51
            {
52
                if (target == me)
53
                    instance_destroy();
54
            }
55
            
scr_lerp_imageblend
scr_lerp_imageblend

function
scr_lerp_imageblend()
{ var lerpblend = instance_create(x, y, obj_lerpimageblend); lerpblend.target = argument0; lerpblend.color1 = argument1; lerpblend.color2 = argument2; var ___time = argument3; if (argument_count > 4) { var _style = argument4; var _ease = argument5; lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time, _style, _ease); } else { lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time); } with (lerpblend) alarm_set(0, ___time + 1); return lerpblend; }
(id, c_white, c_gray, 7);
56
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_alpha", 1, 0, 7);
57
            shadow_force_off = true;
58
        }
59
        jumpmarker = 
scr_marker_ext
scr_marker_ext

function
scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{ var thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { depth = arg8; sprite_index = arg2; image_speed = arg5; image_xscale = arg3; image_yscale = arg4; image_index = arg6; image_blend = arg7; image_alpha = arg11; if (arg9)
scr_depth_alt();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; } function scr_marker_fromasset(arg0, arg1 = depth, arg2 = false) { if (is_undefined(arg0)) { debug_message("Warning: scr_marker_fromasset() sprite_instance didn't exist"); return -4; } var sprite = layer_sprite_get_sprite(arg0); var index = layer_sprite_get_index(arg0); var imagespeed = layer_sprite_get_speed(arg0); var xscale = layer_sprite_get_xscale(arg0); var yscale = layer_sprite_get_yscale(arg0); var angle = layer_sprite_get_angle(arg0); var blend = layer_sprite_get_blend(arg0); var alpha = layer_sprite_get_alpha(arg0); var xloc = layer_sprite_get_x(arg0); var yloc = layer_sprite_get_y(arg0); var thismarker = instance_create_depth(xloc, yloc, arg1, obj_marker); with (thismarker) { sprite_index = sprite; image_index = index; image_speed = imagespeed; image_xscale = xscale; image_yscale = yscale; image_angle = angle; image_blend = blend; image_alpha = alpha; if (arg2)
scr_depth_alt(id, arg2);
} return thismarker; } function scr_assetgetinfo(arg0) { var sprite = layer_sprite_get_sprite(arg0); var index = layer_sprite_get_index(arg0); var xloc = layer_sprite_get_x(arg0); var yloc = layer_sprite_get_y(arg0); var xscale = layer_sprite_get_xscale(arg0); var yscale = layer_sprite_get_yscale(arg0); var angle = layer_sprite_get_angle(arg0); var blend = layer_sprite_get_blend(arg0); var alpha = layer_sprite_get_alpha(arg0); var imagespeed = layer_sprite_get_speed(arg0); return [sprite, index, xloc, yloc, xscale, yscale, angle, blend, alpha, imagespeed]; }
(obj_mainchara.x, obj_mainchara.y, spr_kris_jump_ball_fixed, 2, 2, 0.25, 0, c_white, obj_mainchara.depth);
60
        with (obj_mainchara)
61
            
scr_stickto
scr_stickto

function
scr_stickto(arg0, arg1)
{ _stickto = instance_create(0, 0, obj_stickto); _stickto.stickingobj = id; _stickto.stucktoobj = arg0; _stickto.relativedepth = arg1; with (_stickto) event_user(0); return _stickto; }
(other.jumpmarker, 0);
62
        with (jumpmarker)
63
            
scr_jump_to_point
scr_jump_to_point

function
scr_jump_to_point(arg0, arg1, arg2, arg3, arg4 = 0)
{ var ___jump =
scr_jump_to_point_sprite(arg0, arg1, arg2, arg3, 0, 0);
with (___jump) { trackalpha = arg4; trackblend = arg4; trackindex = arg4; tracksprite = arg4; trackangle = arg4; } return ___jump; }
(other.x - 2, other.y - 22, 8, other.endtime, true);
64
        snd_play(snd_wing);
65
    }
66
    if (timer == (1 + endtime))
67
    {
68
        global.interact = 0;
69
        snd_play(snd_noise);
70
        safe_delete(jumpmarker);
71
        with (instance_create(x + 20, y + 20, obj_climb_kris))
72
        {
73
            if (other.e_up)
74
                yclimb = 1;
75
        }
76
        con = 0;
77
    }
78
}
79
if (susieball != -4)
80
{
81
    susietimer++;
82
    if (susietimer >= 20)
83
    {
84
        snd_play(snd_noise);
85
        safe_delete(susieball);
86
        instance_create(x + 20, y + 20, obj_climb_susie);
87
        susietimer = 0;
88
        susieball = -4;
89
    }
90
}