Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_ch3_BTB03_Create_0

(view raw script w/o annotations or w/e)
1
layer_depth("TILES_Curtains", 90000);
2
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
() && global.tempflag[90] == 2)
3
{
4
    with (obj_mainchara)
5
        setxy(2046, 434);
6
    with (obj_caterpillarchara)
7
    {
8
        if (name == "susie")
9
            setxy(2028, 354);
10
        if (name == "ralsei")
11
            setxy(2028, 274);
12
        
scr_caterpillar_interpolate
scr_caterpillar_interpolate

function
scr_caterpillar_interpolate()
{ _newfacing =
scr_facing_letter_to_number(
scr_get_cardinal_direction(point_direction(x, y, obj_mainchara.x, obj_mainchara.y)));
remx[0] = obj_mainchara.x; remy[0] = obj_mainchara.y; facing[0] = _newfacing; for (_iaia = target; _iaia > 0; _iaia -= 1) { remx[_iaia] = lerp(obj_mainchara.x, x, _iaia / target); if (global.darkzone == 1) remy[_iaia] = lerp(obj_mainchara.y, y + 16, _iaia / target); else remy[_iaia] = lerp(obj_mainchara.y, y + 6, _iaia / target); facing[_iaia] = _newfacing; } }
();
13
    }
14
}
15
con = -1;
16
customcon = 0;
17
var staff_x_pos = -1500;
18
var staff_y_pos = 498;
19
lanino_marker = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(3998 + staff_x_pos, staff_y_pos, spr_npc_lanino_slouch);
20
with (lanino_marker)
21
{
22
    
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
23
    image_speed = 0;
24
}
25
elnina_marker = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(4094 + staff_x_pos, staff_y_pos + 1, spr_npc_elnina_slouch);
26
with (elnina_marker)
27
{
28
    
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
29
    image_speed = 0;
30
}
31
staff_markers = [lanino_marker, elnina_marker];
32
staff_leave = false;
33
staff_leave_timer = 0;
34
staff_index = 0;
35
staff_leave_loop = false;
36
staff_cleanup = false;
37
staff_leave_phase = 0;
38
spotlight = -4;
39
show_spotlight = false;
40
hide_spotlight = false;
41
dustpile = instance_create(2111, 420, obj_ch3_BTB_dustpile);
42
with (dustpile)
43
{
44
    max_plot = 280;
45
    
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
46
}
47
dustpile.target_cutscene = id;
48
dustpile_block = instance_create(dustpile.x + 30, dustpile.y, obj_solidblocksized);
49
dustpile_readable = instance_create(dustpile.x, dustpile.y, obj_readable_room1);
50
with (dustpile_readable)
51
{
52
    extflag = "dustpile_02";
53
    image_xscale = 2;
54
    image_yscale = 2;
55
}
56
if (global.plot >= 280)
57
{
58
    staff_cleanup = true;
59
    with (dustpile_block)
60
        instance_destroy();
61
    with (dustpile_readable)
62
        instance_destroy();
63
}
64
musfade = 0;
65
musvol = 1;