Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_ch5_dw_castle_town_Step_0

(view raw script w/o annotations or w/e)
1
var _lancerspinduration = 60;
2
if (con < 0)
3
    exit;
4
if (con == 0)
5
{
6
    con = 1;
7
    alarm[0]
 = 1;
gml_Object_obj_ch5_dw_castle_town_Alarm_0.gml

con++;
8
    global.interact = 1;
9
    global.facing = 0;
10
}
11
if (con == 2)
12
{
13
    con = 3;
14
    cutscene_master = 
scr_cutscene_make
scr_cutscene_make

function
scr_cutscene_make()
{ _cutscene_master = instance_create(0, 0, obj_cutscene_master); _cutscene_master.master_object = id; return _cutscene_master; }
();
15
    
scr_maincharacters_actors
scr_maincharacters_actors

function
scr_maincharacters_actors()
{ if (i_ex(obj_plat_player)) { scr_maincharacters_actors_plat(); exit; } actor_count = 0; kr = 0; kr_actor = instance_create(obj_mainchara.x, obj_mainchara.y, obj_actor);
scr_actor_setup(kr, kr_actor, "kris");
kr_actor.sprite_index = obj_mainchara.sprite_index; kr_actor.depth = obj_mainchara.depth; with (obj_mainchara) visible = 0; for (__jj = 0; __jj < array_length_1d(global.cinstance); __jj++) { if (i_ex(global.cinstance[__jj])) { if (global.cinstance[__jj].name == "susie") { actor_count++; su = __jj + 1; su_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(su, su_actor, "susie");
su_actor.sprite_index = global.cinstance[__jj].sprite_index; su_actor.depth = global.cinstance[__jj].depth; with (global.cinstance[__jj]) visible = 0; } if (global.cinstance[__jj].name == "ralsei") { actor_count++; ra = __jj + 1; ra_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(ra, ra_actor, "ralsei");
ra_actor.sprite_index = global.cinstance[__jj].sprite_index; ra_actor.depth = global.cinstance[__jj].depth; with (global.cinstance[__jj]) visible = 0; } if (global.cinstance[__jj].name == "noelle") { actor_count++; no = __jj + 1; no_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(no, no_actor, "noelle");
no_actor.sprite_index = global.cinstance[__jj].sprite_index; no_actor.depth = global.cinstance[__jj].depth; with (global.cinstance[__jj]) visible = 0; } } } }
();
16
    
c_pannable
c_pannable

function
c_pannable(arg0)
{
c_cmd("pannable", arg0, 0, 0, 0);
}
(1);
17
    
c_pan
c_pan

function
c_pan(arg0, arg1, arg2)
{
c_cmd("pan", arg0, arg1, arg2, 0);
}
(440, 1000, 1);
18
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(31);
19
    
c_customfunc
c_customfunc

function
c_customfunc(arg0, arg1 = -1)
{ if (instance_exists(obj_cutscene_master)) { with (obj_cutscene_master) array_push(customfuncs, arg0);
c_cmd("customfunc", arg1, 0, 0, 0);
} }
(function()
20
    {
21
        with (obj_border_controller)
22
            show_border(0.67);
23
    });
24
    
c_var_lerp_instance
c_var_lerp_instance

function
c_var_lerp_instance()
{ if (argument_count < 6)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], 0);
else if (argument_count == 6)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
else if (argument_count == 7)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], string(argument[5]) + string(argument[6]));
} function c_lerp_var_instance() { if (argument_count >= 6)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4);
} function c_lerpvar_instance() { if (argument_count >= 6)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4);
}
(blackall, "image_alpha", 1, 0, 15);
25
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(ra);
26
    
c_setxy
c_setxy

function
c_setxy(arg0, arg1)
{
c_cmd("setxy", arg0, arg1, 0, 0);
}
(742, 1064);
27
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("u");
28
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(kr);
29
    
c_setxy
c_setxy

function
c_setxy(arg0, arg1)
{
c_cmd("setxy", arg0, arg1, 0, 0);
}
(742, 1440);
30
    
c_walkdirect_wait
c_walkdirect_wait

function
c_walkdirect_wait(arg0, arg1, arg2)
{
c_walkdirect(arg0, arg1, arg2);
c_wait(arg2);
}
(742, 1178, 60);
31
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("u");
32
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(ra);
33
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("d");
34
    
c_emote
c_emote

function
c_emote()
{ if (argument_count == 0)
c_cmd("emote", "!", 30, 0, 0);
else if (argument_count == 1)
c_cmd("emote", argument[0], 30, 0, 0);
else if (argument_count == 2)
c_cmd("emote", argument[0], argument[1], 0, 0);
else if (argument_count == 3)
c_cmd("emote", argument[0], argument[1], argument[2], 0);
else if (argument_count == 4)
c_cmd("emote", argument[0], argument[1], argument[2], argument[3]);
}
("!", 15);
35
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(30);
36
    
c_msgside
c_msgside

function
c_msgside(arg0)
{
c_cmd("msgside", arg0, 0, 0, 0);
}
("bottom");
37
    
c_speaker
c_speaker

function
c_speaker(arg0)
{
c_cmd("speaker", arg0, 0, 0, 0);
}
("ralsei");
38
    
c_msgsetloc
c_msgsetloc

function
c_msgsetloc(arg0, arg1, arg2)
{ var msg_index = arg0; var english = arg1; var localized_string_id = arg2; var str = english; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgset(msg_index, str);
}
(0,
Face 2* Kris!Wait for inputClose Message
"\\E2* Kris!/%", "obj_ch5_dw_castle_town_slash_Step_0_gml_53_0"
);
39
    
c_talk_wait
c_talk_wait

function
c_talk_wait()
{
c_talk();
c_waittalk();
} function c_talkwait() {
c_talk_wait();
}
();
40
    var _walk_time = 30;
41
    
c_walkdirect
c_walkdirect

function
c_walkdirect(arg0, arg1, arg2)
{
c_cmd("walkdirect", arg0, arg1, arg2, 0);
}
(772, 1166, _walk_time);
42
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(kr);
43
    
c_walkdirect
c_walkdirect

function
c_walkdirect(arg0, arg1, arg2)
{
c_cmd("walkdirect", arg0, arg1, arg2, 0);
}
(712, 1178, _walk_time);
44
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(_walk_time);
45
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("r");
46
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(ra);
47
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("l");
48
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(20);
49
    
c_var_lerp_instance
c_var_lerp_instance

function
c_var_lerp_instance()
{ if (argument_count < 6)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], 0);
else if (argument_count == 6)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
else if (argument_count == 7)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], string(argument[5]) + string(argument[6]));
} function c_lerp_var_instance() { if (argument_count >= 6)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4);
} function c_lerpvar_instance() { if (argument_count >= 6)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4);
}
(lancer_marker, "y", 960, 1160, 20, 3, "out");
50
    c_sound_play(snd_drive);
51
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(20);
52
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(kr);
53
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("u");
54
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(ra);
55
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("u");
56
    
c_speaker
c_speaker

function
c_speaker(arg0)
{
c_cmd("speaker", arg0, 0, 0, 0);
}
("lancer");
57
    
c_msgsetloc
c_msgsetloc

function
c_msgsetloc(arg0, arg1, arg2)
{ var msg_index = arg0; var english = arg1; var localized_string_id = arg2; var str = english; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgset(msg_index, str);
}
(0,
Face 3* Haha!!Delay 11 Kris!!Delay 11 Ready for the Festival!?Wait for inputClose Message
"\\E3* Haha!^1! Kris!^1! Ready for the Festival!?/%", "obj_ch5_dw_castle_town_slash_Step_0_gml_78_0"
);
58
    
c_talk_wait
c_talk_wait

function
c_talk_wait()
{
c_talk();
c_waittalk();
} function c_talkwait() {
c_talk_wait();
}
();
59
    
c_var_instance
c_var_instance

function
c_var_instance(arg0, arg1, arg2)
{
c_cmd_x("var", arg0, arg1, arg2, 0, 0, 0);
}
(lancer_marker, "sprite_index", spr_lancer_partyhat_streamer_unroll);
60
    
c_var_instance
c_var_instance

function
c_var_instance(arg0, arg1, arg2)
{
c_cmd_x("var", arg0, arg1, arg2, 0, 0, 0);
}
(lancer_marker, "image_index", 0);
61
    c_sound_play(snd_lancerwhistle);
62
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(60);
63
    
c_speaker
c_speaker

function
c_speaker(arg0)
{
c_cmd("speaker", arg0, 0, 0, 0);
}
("ralsei");
64
    
c_msgsetloc
c_msgsetloc

function
c_msgsetloc(arg0, arg1, arg2)
{ var msg_index = arg0; var english = arg1; var localized_string_id = arg2; var str = english; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgset(msg_index, str);
}
(0,
Face J* Umm,Delay 11 nice streamer,Delay 11 Lancer!Wait for input
"\\EJ* Umm^1, nice streamer^1, Lancer!/", "obj_ch5_dw_castle_town_slash_Step_0_gml_88_0"
);
65
    
c_facenext
c_facenext

function
c_facenext(arg0, arg1)
{
c_cmd("msgfacenext", arg0, arg1, 0, 0);
}
("lancer", "1");
66
    
c_msgnextloc
c_msgnextloc

function
c_msgnextloc(arg0, arg1)
{ var str = arg0; var localized_string_id = arg1; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgnext(str);
}
(
Face 1* Haha!Delay 11 Thanks!Delay 11 It's my tongue!!Wait for inputClose Message
"\\E1* Haha^1! Thanks^1! It's my tongue!!/%", "obj_ch5_dw_castle_town_slash_Step_0_gml_90_0"
);
67
    
c_talk_wait
c_talk_wait

function
c_talk_wait()
{
c_talk();
c_waittalk();
} function c_talkwait() {
c_talk_wait();
}
();
68
    
c_var_instance
c_var_instance

function
c_var_instance(arg0, arg1, arg2)
{
c_cmd_x("var", arg0, arg1, arg2, 0, 0, 0);
}
(lancer_marker, "spinning", true);
69
    c_sound_play(snd_lancerwhistle);
70
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(60);
71
    
c_speaker
c_speaker

function
c_speaker(arg0)
{
c_cmd("speaker", arg0, 0, 0, 0);
}
("lancer");
72
    
c_msgsetloc
c_msgsetloc

function
c_msgsetloc(arg0, arg1, arg2)
{ var msg_index = arg0; var english = arg1; var localized_string_id = arg2; var str = english; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgset(msg_index, str);
}
(0,
Face 2* And,Delay 11 speaking of saliva!!Wait for input
"\\E2* And^1, speaking of saliva!!/", "obj_ch5_dw_castle_town_slash_Step_0_gml_106_0"
);
73
    
c_msgnextloc
c_msgnextloc

function
c_msgnextloc(arg0, arg1)
{ var str = arg0; var localized_string_id = arg1; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgnext(str);
}
(
Face 3* Did you know Susie's having her big date today?Wait for input
"\\E3* Did you know Susie's having her big date today?/", "obj_ch5_dw_castle_town_slash_Step_0_gml_107_0"
);
74
    
c_msgnextloc
c_msgnextloc

function
c_msgnextloc(arg0, arg1)
{ var str = arg0; var localized_string_id = arg1; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgnext(str);
}
(
Face 2* Kris!!Delay 11 Fido!!Delay 11 Come and help us spiff her up!!Wait for input
"\\E2* Kris!^1! Fido!^1! Come and help us spiff her up!!/", "obj_ch5_dw_castle_town_slash_Step_0_gml_108_0"
);
75
    
c_msgnextloc
c_msgnextloc

function
c_msgnextloc(arg0, arg1)
{ var str = arg0; var localized_string_id = arg1; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgnext(str);
}
(
Face 1* We'll be waiting in Lancer Castle!!Wait for input
"\\E1* We'll be waiting in Lancer Castle!!/", "obj_ch5_dw_castle_town_slash_Step_0_gml_109_0"
);
76
    
c_facenext
c_facenext

function
c_facenext(arg0, arg1)
{
c_cmd("msgfacenext", arg0, arg1, 0, 0);
}
("ralsei", "o");
77
    
c_msgnextloc
c_msgnextloc

function
c_msgnextloc(arg0, arg1)
{ var str = arg0; var localized_string_id = arg1; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgnext(str);
}
(
Face o* Umm,Delay 11 you mean my castle...?Wait for inputClose Message
"\\Eo* Umm^1, you mean my castle...?/%", "obj_ch5_dw_castle_town_slash_Step_0_gml_111_0"
);
78
    
c_talk_wait
c_talk_wait

function
c_talk_wait()
{
c_talk();
c_waittalk();
} function c_talkwait() {
c_talk_wait();
}
();
79
    c_sound_play(snd_drive);
80
    
c_var_lerp_instance
c_var_lerp_instance

function
c_var_lerp_instance()
{ if (argument_count < 6)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], 0);
else if (argument_count == 6)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
else if (argument_count == 7)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], string(argument[5]) + string(argument[6]));
} function c_lerp_var_instance() { if (argument_count >= 6)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4);
} function c_lerpvar_instance() { if (argument_count >= 6)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4);
}
(lancer_marker, "y", 1160, 960, 15);
81
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(60);
82
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(kr);
83
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("r");
84
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(ra);
85
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("l");
86
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(5);
87
    
c_speaker
c_speaker

function
c_speaker(arg0)
{
c_cmd("speaker", arg0, 0, 0, 0);
}
("ralsei");
88
    
c_msgsetloc
c_msgsetloc

function
c_msgsetloc(arg0, arg1, arg2)
{ var msg_index = arg0; var english = arg1; var localized_string_id = arg2; var str = english; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgset(msg_index, str);
}
(0,
Face 2* Well,Delay 11 Kris?Delay 11 Shall we go?Wait for inputClose Message
"\\E2* Well^1, Kris^1? Shall we go?/%", "obj_ch5_dw_castle_town_slash_Step_0_gml_125_0"
);
89
    
c_talk_wait
c_talk_wait

function
c_talk_wait()
{
c_talk();
c_waittalk();
} function c_talkwait() {
c_talk_wait();
}
();
90
    
c_panobj
c_panobj

function
c_panobj(arg0, arg1)
{
c_cmd("panobj", arg0, arg1, 0, 0);
}
(kr_actor, 10);
91
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(10);
92
    
c_pannable
c_pannable

function
c_pannable(arg0)
{
c_cmd("pannable", arg0, 0, 0, 0);
}
(0);
93
    
c_actortokris
c_actortokris

function
c_actortokris()
{
c_cmd("actortokris", 0, 0, 0, 0);
}
();
94
    
c_actortocaterpillar
c_actortocaterpillar

function
c_actortocaterpillar()
{
c_cmd("actortocaterpillar", 0, 0, 0, 0);
} function c_actortocaterpillarstill() {
c_cmd("actortocaterpillarstill", 0, 0, 0, 0);
}
();
95
    
c_terminatekillactors
c_terminatekillactors

function
c_terminatekillactors()
{
c_cmd("terminatekillactors", 0, 0, 0, 0);
}
();
96
}
97
if (con == 3 && !i_ex(obj_cutscene_master))
98
{
99
    with (lancer_marker)
100
        instance_destroy();
101
    global.interact = 0;
102
    global.facing = 0;
103
    global.plot = 50;
104
    con = -99;
105
}
106
with (lancer_marker)
107
{
108
    if (tick >= _lancerspinduration)
109
        spinning = false;
110
    if (spinning == true)
111
    {
112
        var _percent = animcurve_channel_evaluate(animcurve_get_channel(3, "lancer_spinspeed"), tick / _lancerspinduration);
113
        var _spincount = 4;
114
        image_xscale = cos(_percent * _spincount * 2 * pi) * 2;
115
        if (tick <= 20)
116
            y = 1160 - (50 * sin((tick / 20) * pi));
117
        tick++;
118
    }
119
    if (sprite_index == spr_lancer_partyhat_streamer_unroll && image_index > (image_number - 1))
120
        sprite_index = spr_lancer_partyhat_streamer_loop;
121
}