Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_room_castle_town_Create_0

related scripts: Create_0 Step_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
if (global.plot >= 50 && global.plot < 590)
3
{
4
    with (obj_border_controller)
5
        show_border();
6
}
7
var book_pillar = instance_create(640, 265, obj_npc_sign);
8
book_pillar.sprite_index = spr_castle_book_pillar;
9
with (book_pillar)
10
{
11
    image_xscale = 2;
12
    image_yscale = 2;
13
    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
14
}
15
var bakery_readable = instance_create(1240, 560, obj_readable_room1);
16
with (bakery_readable)
17
{
18
    image_xscale = 2;
19
    image_yscale = 2;
20
    extflag = "bakery_sign";
21
}
22
var cyber_readable = instance_create(1160, 1000, obj_readable_room1);
23
with (cyber_readable)
24
{
25
    extflag = "cyber_door";
26
    image_xscale = 4;
27
    image_yscale = 2;
28
}
29
if (global.plot >= 390)
30
{
31
    var credits_event = instance_create(0, 0, obj_credits_ch5_castle_town);
32
}
33
else
34
{
35
    var rudinn_npc = instance_create(955, 1202, obj_npc_room);
36
    with (rudinn_npc)
37
    {
38
        sprite_index = spr_npc_diamond_sleepy;
39
        extflag = "castle_rudinn";
40
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
41
    }
42
    var malius_npc = instance_create(1122, 686, obj_npc_hammerguy);
43
    with (malius_npc)
44
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
45
    var malius_bench = instance_create(malius_npc.x + 89 + 3, malius_npc.y + 76, obj_solidblock);
46
    with (malius_bench)
47
    {
48
        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
49
        sprite_index = spr_dw_castle_maliusworkbench;
50
        visible = true;
51
        depth = malius_npc.depth + 1;
52
    }
53
    if (scr_enemyrecruitcheck("mizzle"))
54
        var mizzle_group = instance_create(0, 0, obj_npc_castle_town_mizzle);
55
}
56
if (
scr_tenna_alt_plot
scr_tenna_alt_plot

function
scr_tenna_alt_plot()
{ var any_lost =
scr_flag_get(1248 times_leveled_ch3)
> 0;
var recruited_shadow_guys =
scr_flag_get(654 recruit_shadowguy)
== 1;
var recruited_pippins =
scr_flag_get(659 recruit_pippins)
== 1;
return any_lost || (!recruited_shadow_guys || !recruited_pippins); } function scr_tenna_in_castletown() { if (
scr_tenna_alt_plot())
return false; if (
scr_flag_get(779)
== 2)
return false; if (
scr_flag_get(1756)
> 0)
return false; return true; }
())
57
{
58
    with (obj_castle_tv)
59
    {
60
        sprite_index = spr_dw_castle_tv_closed;
61
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
62
    }
63
    var tv_block = instance_create(960, 560, obj_solidblocksized);
64
    with (tv_block)
65
        image_xscale = 2;
66
    var tv_readable = instance_create(tv_block.x, tv_block.y, obj_readable_room1);
67
    with (tv_readable)
68
    {
69
        extflag = "closed_tv";
70
        image_xscale = 3;
71
    }
72
}