Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_npc_room_animated_Create_0

(view raw script w/o annotations or w/e)
1
myinteract = 0;
2
talked = 0;
3
image_speed = 0.2;
4
depthcancel = 0;
5
extflag = 0;
6
extTrig = 0;
7
if (global.darkzone == 1)
8
{
9
    image_xscale = 2;
10
    image_yscale = 2;
11
}
12
if (room == room_town_mid)
13
{
14
    if (x >= 320)
15
        sprite_index = spr_npc_icemascot_fake;
16
    else
17
        sprite_index = spr_npc_icemascot2;
18
}
19
if (room == room_diner)
20
{
21
    sprite_index = spr_npc_greenfire;
22
    depth = 4000;
23
    depthcancel = 1;
24
}
25
if (room == room_cc_clover)
26
    sprite_index = spr_cc_boombox;
27
if (room == room_townhall)
28
    sprite_index = spr_npc_icee_suit;
29
if (room == room_lw_icee_pizza)
30
{
31
    if (x > 110)
32
        sprite_index = spr_npc_warrior;
33
}
34
if (room == room_dw_ralsei_castle_1f)
35
    sprite_index = spr_castle_cauldron;
36
if (room == room_dw_ralsei_castle_front)
37
{
38
    if (x >= 550 && x <= 650)
39
    {
40
        if (global.plot >= 200)
41
        {
42
            sprite_index = spr_npc_trashy;
43
            x = 590;
44
            y = 240;
45
        }
46
        else
47
        {
48
            instance_destroy();
49
        }
50
    }
51
}
52
if (room == room_dw_city_roadblock)
53
{
54
    sprite_index = spr_npc_swatchling_sweep;
55
    image_speed = 0.1;
56
}
57
if (room == room_dw_mansion_b_east_b)
58
{
59
    if (scr_keyitemcheck
scr_keyitemcheck

function scr_keyitemcheck(arg0) { haveit = 0; itemcount = 0; for (i = 0; i < 12; i += 1) { if (global.keyitem[i] == arg0) haveit = 1; if (global.keyitem[i] == arg0) itemcount += 1; } return haveit; }
(10) == 0)
60
        sprite_index = spr_shine;
61
    if (scr_keyitemcheck
scr_keyitemcheck

function scr_keyitemcheck(arg0) { haveit = 0; itemcount = 0; for (i = 0; i < 12; i += 1) { if (global.keyitem[i] == arg0) haveit = 1; if (global.keyitem[i] == arg0) itemcount += 1; } return haveit; }
(10) == 1 || global.flag[309 spamton_plot] >= 7)
62
        instance_destroy();
63
}
64
if (room == room_town_church)
65
    sprite_index = spr_npc_rainykid;
66
if (room == room_dw_cyber_musical_door)
67
{
68
    if (extflag == "postSweet")
69
        sprite_index = spr_npc_rainykid;
70
}
71
if (depthcancel == 0)
72
    scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();