Deltarune (Chapter 3) script viewer

← back to main script listing

gml_GlobalScript_scr_resetgameshowcharacter

(view raw script w/o annotations or w/e)
1
function 
scr_resetgameshowcharacter
scr_resetgameshowcharacter

function
scr_resetgameshowcharacter(arg0)
{ if (room == room_dw_puzzlecloset_3) exit; var _name = arg0; var _smooth = 0; var __found = 0; if (argument_count == 2) _smooth = argument1; if (_name == "kris" || _name == "kr" || _name == "k" || _name == "Kris" || _name == "Kr" || _name == "K" || _name == "all") { var _krx = 248; var _kry = 400; if (
scr_swordroom())
{ _krx = 300; _kry = 298; } with (obj_mainchara) { if (_smooth == 0) { setxy(_krx, _kry); } else {
scr_lerpvar("x", x, _krx, _smooth);
scr_lerpvar("y", y, _kry, _smooth);
} fun = true; ignoredepth = true; depth = 95240; sprite_index = spr_krisu_dark; image_speed = 0; image_index = 0; if (
scr_swordroom())
{ sprite_index = spr_krisu_holdcontroller; depth = 96260; }
scr_darksize();
__found = 1; } } if (_name == "susie" || _name == "su" || _name == "Susie" || _name == "Su" || _name == "S" || _name == "s" || _name == "all") { with (obj_caterpillarchara) { if (name == "susie") { fun = true; ignoredepth = true; depth = 95165; var _sux = 140; var _suy = 392; if (_smooth == 0) { setxy(_sux, _suy); } else {
scr_lerpvar("x", x, _sux, _smooth);
scr_lerpvar("y", y, _suy, _smooth);
} sprite_index = spr_susie_walk_up_dw; image_speed = 0; image_index = 0;
scr_darksize();
__found = 1; } } } if (_name == "ralsei" || _name == "ra" || _name == "Ralsei" || _name == "Ra" || _name == "R" || _name == "r" || _name == "all") { with (obj_caterpillarchara) { if (name == "ralsei") { fun = true; ignoredepth = true; depth = 95145; var _rax = 342; var _ray = 396; if (_smooth == 0) { setxy(_rax, _ray); } else {
scr_lerpvar("x", x, _rax, _smooth);
scr_lerpvar("y", y, _ray, _smooth);
} sprite_index = spr_ralsei_walk_up; image_speed = 0; image_index = 0;
scr_darksize();
__found = 1; } } } if (_name == "tenna" || _name == "Tenna" || _name == "te" || _name == "t" || _name == "Te" || _name == "T" || _name == "all") ...
(arg0)
2
{
3
    if (room == room_dw_puzzlecloset_3)
4
        exit;
5
    var _name = arg0;
6
    var _smooth = 0;
7
    var __found = 0;
8
    if (argument_count == 2)
9
        _smooth = argument1;
10
    if (_name == "kris" || _name == "kr" || _name == "k" || _name == "Kris" || _name == "Kr" || _name == "K" || _name == "all")
11
    {
12
        var _krx = 248;
13
        var _kry = 400;
14
        if (
scr_swordroom
scr_swordroom

function
scr_swordroom()
{ if (room == room_board_dungeon_2 || room == room_board_dungeon_3 || room == room_board_sword_intro || room == room_board_1_sword || room == room_board_1_sword_trees || room == room_board_preshadowmantle || room == room_board_preshadowmantle_repeat || room == room_shadowmantle || room == room_board_prepostshadowmantle || room == room_board_postshadowmantle || room == room_board_2_sword || room == room_board_3_sword) return true; else return false; }
())
15
        {
16
            _krx = 300;
17
            _kry = 298;
18
        }
19
        with (obj_mainchara)
20
        {
21
            if (_smooth == 0)
22
            {
23
                setxy(_krx, _kry);
24
            }
25
            else
26
            {
27
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, _krx, _smooth);
28
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("y", y, _kry, _smooth);
29
            }
30
            fun = true;
31
            ignoredepth = true;
32
            depth = 95240;
33
            sprite_index = spr_krisu_dark;
34
            image_speed = 0;
35
            image_index = 0;
36
            if (
scr_swordroom
scr_swordroom

function
scr_swordroom()
{ if (room == room_board_dungeon_2 || room == room_board_dungeon_3 || room == room_board_sword_intro || room == room_board_1_sword || room == room_board_1_sword_trees || room == room_board_preshadowmantle || room == room_board_preshadowmantle_repeat || room == room_shadowmantle || room == room_board_prepostshadowmantle || room == room_board_postshadowmantle || room == room_board_2_sword || room == room_board_3_sword) return true; else return false; }
())
37
            {
38
                sprite_index = spr_krisu_holdcontroller;
39
                depth = 96260;
40
            }
41
            
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
42
            __found = 1;
43
        }
44
    }
45
    if (_name == "susie" || _name == "su" || _name == "Susie" || _name == "Su" || _name == "S" || _name == "s" || _name == "all")
46
    {
47
        with (obj_caterpillarchara)
48
        {
49
            if (name == "susie")
50
            {
51
                fun = true;
52
                ignoredepth = true;
53
                depth = 95165;
54
                var _sux = 140;
55
                var _suy = 392;
56
                if (_smooth == 0)
57
                {
58
                    setxy(_sux, _suy);
59
                }
60
                else
61
                {
62
                    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, _sux, _smooth);
63
                    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("y", y, _suy, _smooth);
64
                }
65
                sprite_index = spr_susie_walk_up_dw;
66
                image_speed = 0;
67
                image_index = 0;
68
                
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
69
                __found = 1;
70
            }
71
        }
72
    }
73
    if (_name == "ralsei" || _name == "ra" || _name == "Ralsei" || _name == "Ra" || _name == "R" || _name == "r" || _name == "all")
74
    {
75
        with (obj_caterpillarchara)
76
        {
77
            if (name == "ralsei")
78
            {
79
                fun = true;
80
                ignoredepth = true;
81
                depth = 95145;
82
                var _rax = 342;
83
                var _ray = 396;
84
                if (_smooth == 0)
85
                {
86
                    setxy(_rax, _ray);
87
                }
88
                else
89
                {
90
                    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, _rax, _smooth);
91
                    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("y", y, _ray, _smooth);
92
                }
93
                sprite_index = spr_ralsei_walk_up;
94
                image_speed = 0;
95
                image_index = 0;
96
                
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
97
                __found = 1;
98
            }
99
        }
100
    }
101
    if (_name == "tenna" || _name == "Tenna" || _name == "te" || _name == "t" || _name == "Te" || _name == "T" || _name == "all")
102
    {
103
        with (obj_actor_tenna)
104
        {
105
            sprite_index = spr_tenna_faceaway;
106
            var _tex = 484;
107
            if (global.flag[1022 tenna_board_absent] == 1)
108
                _tex = 784;
109
            var _tey = 576;
110
            if (_smooth == 0)
111
            {
112
                setxy(_tex, _tey);
113
            }
114
            else
115
            {
116
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, _tex, _smooth);
117
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("y", y, _tey, _smooth);
118
            }
119
            __found = 1;
120
        }
121
    }
122
}