Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_ch3_couch_overworld_controller_Create_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
if (room == room_dw_couch_overworld_03)
3
{
4
    var _wobbled = global.plot >= 22;
5
    if (!_wobbled)
6
        con = 10;
7
    special_wobbler = instance_create(1264, 335, obj_dw_wobbler);
8
    if (_wobbled)
9
    {
10
        special_wobbler.sprite_index = spr_dw_couch_shutta_hand;
11
        special_wobbler.x += 15;
12
        special_wobbler.y += 66;
13
    }
14
}
15
else if (room == room_dw_couch_points)
16
{
17
    con = 20;
18
    dustpile = -4;
19
    treasure_marker = -4;
20
    open_chest = false;
21
    chest_con = 0;
22
    points_display = -4;
23
    if (variable_global_exists("pause_follow"))
24
    {
25
        if (global.pause_follow)
26
        {
27
            
scr_losechar
scr_losechar

function
scr_losechar()
{ global.char[2] = 0; global.char[1] = 0; with (obj_darkcontroller) { chartotal = 0; havechar[0] = 0; havechar[1] = 0; havechar[2] = 0; havechar[3] = 0; for (i = 0; i < 3; i += 1) { global.faceaction[i] = 0; if (global.char[i] != 0) chartotal += 1; if (global.char[i] == 1) { havechar[0] = 1; charpos[0] = i; } if (global.char[i] == 2) { havechar[1] = 1; charpos[1] = i; } if (global.char[i] == 3) { havechar[2] = 1; charpos[2] = i; } if (global.char[i] == 4) { havechar[3] = 1; charpos[3] = i; } } } global.submenu = 0; global.charselect = -1; for (i = 0; i < 36; i += 1) global.submenucoord[i] = 0; }
();
28
            with (obj_caterpillarchara)
29
                instance_destroy();
30
        }
31
    }
32
    var _found_treasure = 
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(1101) > 0;
33
    var _found_points = 
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(1101) > 1;
34
    if (_found_treasure)
35
    {
36
        var _dustpile_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; }
(390, 270, spr_dustpile_parts);
37
        _dustpile_marker.image_index = 3;
38
        with (_dustpile_marker)
39
            
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)); } }
();
40
        var _dustpile_block = instance_create(400, 330, obj_solidblock);
41
        with (_dustpile_block)
42
        {
43
            image_xscale = 5;
44
            image_yscale = 3;
45
        }
46
        treasure_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; }
(432, 290, spr_treasurebox);
47
        treasure_marker.depth = _dustpile_marker.depth - 10;
48
        var _treasure_readable = instance_create(treasure_marker.x, treasure_marker.y, obj_readable_room1);
49
        with (_treasure_readable)
50
        {
51
            image_xscale = 2;
52
            image_yscale = 2;
53
            extflag = "points";
54
        }
55
        if (_found_points)
56
            treasure_marker.image_index = 1;
57
    }
58
    else
59
    {
60
        dustpile = instance_create(390, 270, obj_dustpile);
61
        with (dustpile)
62
            
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)); } }
();
63
    }
64
}
65
else if (room == room_dw_couch_overworld_intro_left)
66
{
67
    zapper_timer = 0;
68
    zapper = 
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; }
(140, 308, spr_dw_couch_zapper_sneeze);
69
    with (zapper)
70
    {
71
        image_index = 3;
72
        
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)); } }
();
73
    }
74
    if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(1102) == 0)
75
        con = 30;
76
}