Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_room_ranking_a_Create_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
customcon = 0;
3
var door_list = ["susiezilla", "chef", "band"];
4
for (var i = 0; i < array_length(door_list); i++)
5
{
6
    var _door = instance_create(150 + (i * 320), 130, obj_dw_ranking_minigame_door);
7
    with (_door)
8
        init(door_list[i]);
9
}
10
pippins_marker = -4;
11
pippins_readable = -4;
12
pippins_block = -4;
13
if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(1189) == 0)
14
{
15
    pippins_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; }
(194, 165, spr_npc_pippins_jump_cool);
16
    pippins_marker.image_speed = 0.2;
17
    with (pippins_marker)
18
        
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)); } }
();
19
    pippins_readable = instance_create(pippins_marker.x + 8, pippins_marker.y + 20, obj_readable_room1);
20
    with (pippins_readable)
21
    {
22
        image_xscale = 3;
23
        image_yscale = 3;
24
        extflag = "unlock_susiezilla";
25
    }
26
    pippins_block = instance_create(pippins_marker.x, pippins_marker.y + 8, obj_solidblocksized);
27
    with (pippins_block)
28
    {
29
        image_xscale = 2;
30
        image_yscale = 2;
31
    }
32
}
33
34
unlock_susiezilla = function()
35
{
36
    var can_afford = global.flag[1044 points] >= 500;
37
    if (can_afford)
38
    {
39
        con = 50;
40
        global.flag[1044 points] -= 500;
41
    }
42
    else
43
    {
44
        con = 10;
45
    }
46
    with (pippins_marker)
47
    {
48
        image_index = 0;
49
        image_speed = 0;
50
    }
51
};