Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_room_castle_2f_Create_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
cutscene_master = noone;
3
leaveCounter = 0;
4
if (global.chapter < 2)
5
{
6
    instance_destroy();
7
}
8
else if (global.flag[387 returned_castle_town] == 1)
9
{
10
    if (global.flag[388 got_no_recruits] == 1 || scr_get_total_recruits(2) == 0)
11
    {
12
        var queen_npc = instance_create(1054, 175, obj_npc_sign);
13
        queen_npc.sprite_index = spr_queen_walk_up;
14
        queen_npc.image_speed = 0;
15
        with (queen_npc)
16
            
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)); } }
();
17
    }
18
    else if (scr_get_total_recruits(2) >= 9)
19
    {
20
        var queen_npc = instance_create(990, 225, obj_npc_sign);
21
        queen_npc.sprite_index = spr_npc_queen_relax;
22
        queen_npc.image_speed = 0;
23
        with (queen_npc)
24
            
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)); } }
();
25
        var lancer_npc = instance_create(875, 235, obj_npc_sign);
26
        lancer_npc.sprite_index = spr_lancer_dark_relax;
27
        lancer_npc.image_speed = 0;
28
        with (lancer_npc)
29
            
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)); } }
();
30
        var rudinn_npc = instance_create(1120, 240, obj_npc_room_animated);
31
        rudinn_npc.sprite_index = spr_diamond_fan;
32
        with (rudinn_npc)
33
        {
34
            
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)); } }
();
35
            image_speed = 0.1;
36
        }
37
    }
38
    else
39
    {
40
        var queen_npc = instance_create(1054, 175, obj_npc_facing);
41
        with (queen_npc)
42
            
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)); } }
();
43
    }
44
}