Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_ch5_DWCL03_Create_0

(view raw script w/o annotations or w/e)
1
turnofflayers("CUTSCENE");
2
turnofflayers("Assets_Pillars");
3
init = 0;
4
con = 0;
5
sneaksound = -1;
6
tempflag_index = 60;
7
spotlight = [];
8
sneaking = false;
9
sneak_con = 0;
10
sneak_dist = 0;
11
sneak_time = 0;
12
su_off = new Vector2(12, -20);
13
ra_off = new Vector2(-12, -24);
14
sneak_height = 0;
15
sneak_start = new Vector2(0, 0);
16
sneak_end = new Vector2(0, 0);
17
pitch_shift = 0;
18
hat_con = 0;
19
hat = -4;
20
timer = 0;
21
whiteall = instance_create_depth(-5, -5, -1000, obj_marker);
22
whiteall.sprite_index = spr_whitepixel;
23
whiteall.image_xscale = room_width + 10;
24
whiteall.image_yscale = room_height + 10;
25
whiteall.image_alpha = 0;
26
whiteall.visible = false;
27
jail_markers = [scr_marker_fromasset(findsprite(spr_dw_fcastle_jail_bars, "Assets_Pillars", c_red), 1000100), scr_marker_fromasset(findsprite(spr_dw_fcastle_jail_bars, "Assets_Pillars", c_lime), 1000100)];
28
jail_markers[0].image_blend = c_white;
29
jail_markers[1].image_blend = c_white;
30
31
c_party_walkdirect_speed = function()
32
{
33
    if (argument5 == true)
34
    {
35
        
c_customfunc
c_customfunc

function
c_customfunc(arg0, arg1 = -1)
{ if (instance_exists(obj_cutscene_master)) { with (obj_cutscene_master) array_push(customfuncs, arg0);
c_cmd("customfunc", arg1, 0, 0, 0);
} }
(function()
36
        {
37
            with (obj_move_to_point)
38
                instance_destroy();
39
        });
40
    }
41
    
c_sel_walkdirect_speed
c_sel_walkdirect_speed

function
c_sel_walkdirect_speed(arg0, arg1, arg2, arg3)
{
c_cmd("select", arg0, 0, 0, 0);
c_cmd("walkdirect", arg1, arg2, -arg3, 0);
}
(kr, argument0, argument1, argument4);
42
    
c_sel_walkdirect_speed
c_sel_walkdirect_speed

function
c_sel_walkdirect_speed(arg0, arg1, arg2, arg3)
{
c_cmd("select", arg0, 0, 0, 0);
c_cmd("walkdirect", arg1, arg2, -arg3, 0);
}
(su, argument0 + argument2.x, argument1 + argument2.y, argument4);
43
    
c_sel_walkdirect_speed
c_sel_walkdirect_speed

function
c_sel_walkdirect_speed(arg0, arg1, arg2, arg3)
{
c_cmd("select", arg0, 0, 0, 0);
c_cmd("walkdirect", arg1, arg2, -arg3, 0);
}
(ra, argument0 + argument3.x, argument1 + argument3.y, argument4);
44
};
45
46
party_sneak = function()
47
{
48
    var _distance = round_to_multiple(lerp(sneak_start.x, sneak_end.x, argument0), 2);
49
    actor_movedirect(kr_actor, _distance, sneak_start.y, -2);
50
    actor_movedirect(su_actor, _distance + su_off.x, sneak_start.y + su_off.y, -2);
51
    actor_movedirect(ra_actor, _distance + ra_off.x, sneak_start.y + ra_off.y, -2);
52
};
53
54
c_party_walkdirect = function()
55
{
56
    if (argument5 == true)
57
    {
58
        
c_customfunc
c_customfunc

function
c_customfunc(arg0, arg1 = -1)
{ if (instance_exists(obj_cutscene_master)) { with (obj_cutscene_master) array_push(customfuncs, arg0);
c_cmd("customfunc", arg1, 0, 0, 0);
} }
(function()
59
        {
60
            with (obj_move_to_point)
61
                instance_destroy();
62
        });
63
    }
64
    
c_sel_walkdirect
c_sel_walkdirect

function
c_sel_walkdirect(arg0, arg1, arg2, arg3)
{
c_cmd("select", arg0, 0, 0, 0);
c_cmd("walkdirect", arg1, arg2, arg3, 0);
}
(kr, argument0, argument1, argument4);
65
    
c_sel_walkdirect
c_sel_walkdirect

function
c_sel_walkdirect(arg0, arg1, arg2, arg3)
{
c_cmd("select", arg0, 0, 0, 0);
c_cmd("walkdirect", arg1, arg2, arg3, 0);
}
(su, argument0 + argument2.x, argument1 + argument2.y, argument4);
66
    
c_sel_walkdirect
c_sel_walkdirect

function
c_sel_walkdirect(arg0, arg1, arg2, arg3)
{
c_cmd("select", arg0, 0, 0, 0);
c_cmd("walkdirect", arg1, arg2, arg3, 0);
}
(ra, argument0 + argument3.x, argument1 + argument3.y, argument4);
67
};
68
69
actor_movedirect = function()
70
{
71
    var _new = true;
72
    if (i_ex(obj_move_to_point))
73
    {
74
        with (obj_move_to_point)
75
        {
76
            if (target == argument0)
77
            {
78
                other.actor_move = id;
79
                _new = false;
80
                break;
81
            }
82
        }
83
    }
84
    if (_new)
85
    {
86
        actor_move = instance_create(0, 0, obj_move_to_point);
87
        actor_move.target = argument0;
88
    }
89
    actor_move.movex = argument1;
90
    actor_move.movey = argument2;
91
    if (argument3 > 0)
92
    {
93
        actor_move.movemax = argument3;
94
    }
95
    else
96
    {
97
        var __walktime = 0;
98
        if (_new)
99
            __walktime = point_distance(argument0.x, argument0.y, argument1, argument2) / -argument3;
100
        else
101
            __walktime = point_distance(actor_move.x, actor_move.y, argument1, argument2) / -argument3;
102
        if (__walktime < 1)
103
            __walktime = 1;
104
        actor_move.movemax = __walktime;
105
    }
106
};