Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_room_ranking_b_Create_0

(view raw script w/o annotations or w/e)
1
with (obj_border_controller)
2
{
3
    stop_custom_effect();
4
    show_border();
5
}
6
freezewall = false;
7
visible = true;
8
depth = 10;
9
drawblue = false;
10
if (global.flag[1226 got_1225_room] == 0)
11
{
12
    gatrig = instance_create(280, 340, obj_trigger_interact);
13
    with (gatrig)
14
    {
15
        strict = true;
16
        
scr_size
scr_size

function
scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{ with (arg2) { image_xscale = arg0; image_yscale = arg1; } }
(5.25, 2.5);
17
        visible = false;
18
    }
19
    gacon = 0;
20
    garead = 0;
21
    gacha_active = false;
22
    gacha_con = -1;
23
    var _vending_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; }
(440, 234, spr_dw_tvland_preview_vending);
24
    with (_vending_marker)
25
        
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)); } }
();
26
    gachapon = instance_create(214, 78, obj_ch3_gachapon);
27
    gachaslot = 
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();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; }
(296, 294, spr_dw_tv_gachapon_coinslot, 2, 2, 0, 0, undefined, _vending_marker.depth - 10);
28
    gachaslot.visible = false;
29
    gacha_block = instance_create(gachapon.x, gachapon.y + 220, obj_solidblocksized);
30
    with (gacha_block)
31
    {
32
        image_xscale = 5;
33
        image_yscale = 2;
34
    }
35
    prompt_text = "";
36
    var _vending_readable = instance_create(_vending_marker.x + 8, _vending_marker.y + 40, obj_readable_room1);
37
    with (_vending_readable)
38
    {
39
        extflag = "vending";
40
        image_xscale = 2;
41
        image_yscale = 2;
42
    }
43
    var _vending_block = instance_create(_vending_marker.x, _vending_marker.y, obj_solidblocksized);
44
    with (_vending_block)
45
    {
46
        image_xscale = 1.5;
47
        image_yscale = 2;
48
    }
49
    var _sign = instance_create(145, 411, obj_npc_sign);
50
    with (_sign)
51
    {
52
        
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)); } }
();
53
        extflag = "gacha_instructions";
54
    }
55
    
56
    show_vending_prompt = function()
57
    {
58
        gacha_con = 0;
59
    };
60
    
61
    start_gacha_event = function()
62
    {
63
        gacha_active = true;
64
        with (obj_ch3_gachapon)
65
        {
66
            con = 0;
67
            dispense = 1;
68
        }
69
    };
70
    
71
    finish_gacha_event = function()
72
    {
73
        gacha_active = false;
74
        with (obj_ch3_gachapon)
75
            con = -1;
76
        regain_control();
77
    };
78
    
79
    regain_control = function()
80
    {
81
        if (gacha_active)
82
            finish_gacha_event();
83
        else
84
            gacha_con = 90;
85
    };
86
    
87
    gachacost = 100;
88
    numentry = 0;
89
    siner = 0;
90
    bgalpha = 0;
91
    controltext1 = 0;
92
    controltext2 = 0;
93
}
94
else if (global.entrance == 5)
95
{
96
    with (obj_caterpillarchara)
97
        visible = false;
98
}
99
shine = -4;
100
if (global.flag[1226 got_1225_room] == 1)
101
{
102
    if (global.flag[1092 ch3_bibliox_state] == 5)
103
    {
104
        show_debug_message_concat("yes");
105
        shine = instance_create(245, 305, obj_trigger_interact);
106
        with (shine)
107
        {
108
            sprite_index = spr_shine_white;
109
            
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
110
            image_speed = 0.2;
111
            image_alpha = 1;
112
            visible = true;
113
            
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)); } }
();
114
            depth += 5000;
115
        }
116
    }
117
}
118
if (global.entrance != 5)
119
    
scr_musicer
scr_musicer

function
scr_musicer(arg0 = "dogcheck.ogg", arg1 = 0.7, arg2 = 1, arg3 = 0, arg4 = -1)
{ var musicer = instance_create_depth(0, 0, 0, obj_musicer_gen); musicer.song = arg0; musicer.volume = arg1; musicer.pitch = arg2; musicer.delay = arg3; musicer.fadein = arg4; return musicer; }
("greenroom_detune.ogg");