Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_npc_room_Step_1

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    init = 1;
4
    if (room == room_dw_teevie_dust_south)
5
    {
6
        if (scr_enemylostcheck("shuttah"))
7
            instance_destroy();
8
    }
9
    if (room == room_dw_b3bs_cooltrashy)
10
    {
11
        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
12
        if (extflag == "trashy")
13
            sprite_index = spr_ch3_b3bs_cooltrashy_shades;
14
        if (extflag == "ribbick")
15
            sprite_index = spr_ribbick_small;
16
    }
17
    if (room == room_dw_ch3_man)
18
    {
19
        if (extflag == "rudinn1" || extflag == "rudinn2" || extflag == "rudinn3" || extflag == "rudinn4" || extflag == "rudinn5" || extflag == "rudinn6")
20
        {
21
            sprite_index = choose(spr_board_rudinn_blue, spr_board_rudinn_yellow);
22
            image_index = 0;
23
            image_speed = 0;
24
        }
25
        if (extflag == "rudinn3")
26
            sprite_index = spr_board_rudinn_pink;
27
        if (extflag == "binos")
28
            sprite_index = spr_board_binos;
29
        if (extflag == "sign1" || extflag == "sign2" || extflag == "sign3" || extflag == "sign4")
30
            sprite_index = spr_board_sign_dmg;
31
        
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)); } }
();
32
    }
33
    if (room == room_dw_b3bs_cheaterpippins)
34
    {
35
        sprite_index = spr_npc_pippins;
36
        
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)); } }
();
37
    }
38
    if (room == room_dw_b3bs_watercooler)
39
        sprite_index = spr_npc_zapper;
40
    if (room == room_dw_b3bs_zapper_b)
41
    {
42
        if (extflag == "watercooler")
43
            sprite_index = spr_b3bs_watercooler;
44
    }
45
    if (room == room_dw_b3bs_jail1)
46
    {
47
        if (extflag == "sam")
48
            sprite_index = spr_npc_gouldensamFaceOnly;
49
        if (extflag == "starwalker")
50
            sprite_index = spr_npc_originalstarwalker;
51
        if (extflag == "jailpippins" || extflag == "freepippins")
52
            sprite_index = spr_npc_pippins;
53
        if (extflag == "shadowguy")
54
            sprite_index = spr_shadowman_sax_a;
55
    }
56
    if (room == room_dw_b3bs_sadshadowguys)
57
    {
58
        if (extflag == "poppins")
59
            sprite_index = spr_npc_pippins;
60
    }
61
}
62
var objInd = 1156;
63
if (global.chapter == 3 && room == room_dw_ch3_man)
64
    objInd = 184;
65
if (normalanim == 1)
66
{
67
    if (myinteract > 0 && instance_exists(objInd))
68
    {
69
        if (objInd.halt > 0)
70
        {
71
            image_speed = 0;
72
            image_index = 0;
73
        }
74
        if (objInd.halt == 0)
75
            image_speed = remanimspeed;
76
    }
77
}
78
if (normalanim == 1 || normalanim == 2)
79
{
80
    if (myinteract == 0)
81
    {
82
        image_index = 0;
83
        image_speed = 0;
84
    }
85
}
86
if (normalanim == 3)
87
{
88
    if (myinteract > 0 && instance_exists(objInd))
89
    {
90
        if (objInd.halt > 0)
91
            image_speed = remanimspeed;
92
        if (objInd.halt == 0)
93
            image_speed = remanimspeed / 2;
94
    }
95
    else
96
    {
97
        image_speed = remanimspeed;
98
    }
99
}
100
if (normalanim == 4)
101
{
102
    image_index = 0;
103
    image_speed = 0;
104
}
105
if (normalanim == 5)
106
{
107
    if (myinteract > 0 && instance_exists(objInd))
108
    {
109
        image_speed = 0;
110
        image_index = 1;
111
    }
112
    else
113
    {
114
        image_speed = 0;
115
        image_index = 0;
116
    }
117
}
118
if (normalanim == 6)
119
{
120
    if (myinteract > 0 && instance_exists(objInd))
121
    {
122
        if (objInd.halt > 0)
123
        {
124
            image_speed = 0;
125
            image_index = 0;
126
        }
127
        if (objInd.halt == 0)
128
        {
129
            image_speed = 0;
130
            image_index = 1;
131
        }
132
    }
133
}