Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_church_warpflame_Step_0

(view raw script w/o annotations or w/e)
1
if (!colinit)
2
{
3
    var mycol = 16777215;
4
    if (color == "red")
5
        mycol = 3539199;
6
    if (color == "pink")
7
        mycol = 11703780;
8
    if (color == "green")
9
        mycol = 5632512;
10
    if (color == "blue")
11
        mycol = 15124796;
12
    image_blend = mycol;
13
    colinit = 1;
14
}
15
if (myinteract == 3)
16
{
17
    global.interact = 1;
18
    global.msc = -99;
19
    global.choice = -1;
20
    global.choicemsg[0] = stringsetloc(
#Yes
"#Yes", "obj_dw_church_warpflame_slash_Step_0_gml_22_0"
);
21
    global.choicemsg[1] = stringsetloc(
#Do Not
"#Do Not", "obj_dw_church_warpflame_slash_Step_0_gml_23_0"
);
22
    global.choicemsg[2] = stringset("");
23
    global.choicemsg[3] = stringset("");
24
    
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
25
    msgset(0, "* (invalid roomtarg...)/");
26
    if (roomtarg == 270)
27
    {
28
        msgsetloc(0, 
* (A pink flame...Delay 11 it glows hesitatingly.)Wait for input
"* (A pink flame..^1. it glows hesitatingly.)/", "obj_dw_church_warpflame_slash_Step_0_gml_32_0"
);
29
        global.choicemsg[0] = stringsetloc(
#Return to#beginning
"#Return to#beginning", "obj_dw_church_warpflame_slash_Step_0_gml_33_0"
);
30
    }
31
    if (roomtarg == 277)
32
    {
33
        if (instance_exists(obj_dw_churchc_prepretitan))
34
        {
35
            msgsetloc(0, 
* (A red flame...Delay 11 it glows hesitatingly.)Wait for input
"* (A red flame..^1. it glows hesitatingly.)/", "obj_dw_church_warpflame_slash_Step_0_gml_41_0"
);
36
            global.choicemsg[0] = stringsetloc(
#Return to#save point
"#Return to#save point", "obj_dw_church_warpflame_slash_Step_0_gml_42_0"
);
37
        }
38
        if (instance_exists(obj_dw_churchc_superprophecies))
39
        {
40
            msgsetloc(0, 
* (A pink flame...Delay 11 it glows hurriedly.)Wait for input
"* (A pink flame..^1. it glows hurriedly.)/", "obj_dw_church_warpflame_slash_Step_0_gml_48_0"
);
41
            global.choicemsg[0] = stringsetloc(
#Return to#save point
"#Return to#save point", "obj_dw_church_warpflame_slash_Step_0_gml_49_0"
);
42
        }
43
    }
44
    if (roomtarg == 280)
45
    {
46
        msgsetloc(0, 
* (A red flame...Delay 11 It glows with finality.)Wait for input
"* (A red flame..^1. It glows with finality.)/", "obj_dw_church_warpflame_slash_Step_0_gml_55_0"
);
47
        global.choicemsg[0] = stringsetloc(
#Go to#Fountain
"#Go to#Fountain", "obj_dw_church_warpflame_slash_Step_0_gml_56_0"
);
48
    }
49
    if (roomtarg == 115)
50
    {
51
        msgsetloc(0, 
* (A green flame...Delay 11 It glows with knowledge.)Wait for input
"* (A green flame..^1. It glows with knowledge.)/", "obj_dw_church_warpflame_slash_Step_0_gml_61_0"
);
52
        global.choicemsg[0] = stringsetloc(
Go to#Old Man's#Study
"Go to#Old Man's#Study", "obj_dw_church_warpflame_slash_Step_0_gml_62_0"
);
53
    }
54
    if (roomtarg == 261)
55
    {
56
        msgsetloc(0, 
* (A green flame...Delay 11 It glows with anticipation.)Wait for input
"* (A green flame..^1. It glows with anticipation.)/", "obj_dw_church_warpflame_slash_Step_0_gml_67_0"
);
57
        global.choicemsg[0] = stringsetloc(
#Go to#Grand Door
"#Go to#Grand Door", "obj_dw_church_warpflame_slash_Step_0_gml_68_0"
);
58
    }
59
    if (color == "blue")
60
    {
61
        if (roomtarg == 181)
62
        {
63
            musfade = true;
64
            msgsetloc(0, 
* (The Blue Flame flickers with the vision of a battle unfinished...)Wait for input
"* (The Blue Flame flickers with the vision of a battle unfinished...)/", "obj_dw_church_warpflame_slash_Step_0_gml_76_0"
);
65
            global.choicemsg[0] = stringsetloc(
#Return to Dark
"#Return to Dark", "obj_dw_church_warpflame_slash_Step_0_gml_77_0"
);
66
        }
67
        if (roomtarg == 295)
68
        {
69
            musfade = true;
70
            msgsetloc(0, 
* (The Blue Flame flickers with the vision of a battle unfinished...)Wait for input
"* (The Blue Flame flickers with the vision of a battle unfinished...)/", "obj_dw_church_warpflame_slash_Step_0_gml_81_0"
);
71
            global.choicemsg[0] = stringsetloc(
#Return to#Shadow
"#Return to#Shadow", "obj_dw_church_warpflame_slash_Step_0_gml_82_0"
);
72
        }
73
    }
74
    msgnext("\\C2 ");
75
    d_make();
76
    myinteract = 5;
77
}
78
if (myinteract == 5 && global.choice != -1)
79
{
80
    if (global.choice == 0)
81
    {
82
        k_d();
83
        if (roomtarg == 181)
84
        {
85
        }
86
        if (roomtarg == 295)
87
            global.plot = 239.99;
88
        myinteract = 6;
89
    }
90
    if (global.choice == 1)
91
    {
92
        k_d();
93
        myinteract = 0;
94
        global.interact = 0;
95
    }
96
}
97
if (myinteract == 6 && !d_ex())
98
{
99
    var fadecol = merge_color(image_blend, c_white, 0.9);
100
    timer++;
101
    var fadetime = 24;
102
    if (timer == 1)
103
    {
104
        snd_play(snd_ghostappear);
105
        if (musfade)
106
            snd_volume(global.currentsong[1], 0, fadetime);
107
        fadeout = 
scr_marker_ext
scr_marker_ext

function
scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{ var thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { depth = arg8; sprite_index = arg2; image_speed = arg5; image_xscale = arg3; image_yscale = arg4; image_index = arg6; image_blend = arg7; image_alpha = arg11; if (arg9)
scr_depth_alt();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; } function scr_marker_fromasset(arg0, arg1 = depth, arg2 = false) { if (is_undefined(arg0)) { debug_message("Warning: scr_marker_fromasset() sprite_instance didn't exist"); return -4; } var sprite = layer_sprite_get_sprite(arg0); var index = layer_sprite_get_index(arg0); var imagespeed = layer_sprite_get_speed(arg0); var xscale = layer_sprite_get_xscale(arg0); var yscale = layer_sprite_get_yscale(arg0); var angle = layer_sprite_get_angle(arg0); var blend = layer_sprite_get_blend(arg0); var alpha = layer_sprite_get_alpha(arg0); var xloc = layer_sprite_get_x(arg0); var yloc = layer_sprite_get_y(arg0); var thismarker = instance_create_depth(xloc, yloc, arg1, obj_marker); with (thismarker) { sprite_index = sprite; image_index = index; image_speed = imagespeed; image_xscale = xscale; image_yscale = yscale; image_angle = angle; image_blend = blend; image_alpha = alpha; if (arg2)
scr_depth_alt(id, arg2);
} return thismarker; } function scr_assetgetinfo(arg0) { var sprite = layer_sprite_get_sprite(arg0); var index = layer_sprite_get_index(arg0); var xloc = layer_sprite_get_x(arg0); var yloc = layer_sprite_get_y(arg0); var xscale = layer_sprite_get_xscale(arg0); var yscale = layer_sprite_get_yscale(arg0); var angle = layer_sprite_get_angle(arg0); var blend = layer_sprite_get_blend(arg0); var alpha = layer_sprite_get_alpha(arg0); var imagespeed = layer_sprite_get_speed(arg0); return [sprite, index, xloc, yloc, xscale, yscale, angle, blend, alpha, imagespeed]; }
(camerax(), cameray(), spr_pxwhite, 640, 480, undefined, undefined, image_blend, -99, undefined, 0);
108
        with (fadeout)
109
        {
110
            
scr_lerp_imageblend
scr_lerp_imageblend

function
scr_lerp_imageblend()
{ var lerpblend = instance_create(x, y, obj_lerpimageblend); lerpblend.target = argument0; lerpblend.color1 = argument1; lerpblend.color2 = argument2; var ___time = argument3; if (argument_count > 4) { var _style = argument4; var _ease = argument5; lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time, _style, _ease); } else { lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time); } with (lerpblend) alarm_set(0, ___time + 1); return lerpblend; }
(id, image_blend, fadecol, fadetime, 4, "in");
111
            image_alpha = 0;
112
            
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; }
("image_alpha", 0, 1, round(fadetime * 0.75), 2, "out");
113
        }
114
    }
115
    if (timer == (1 + fadetime))
116
    {
117
        if (musfade)
118
        {
119
            snd_free(global.currentsong[0]);
120
            snd_stop_all();
121
        }
122
        global.facing = 0;
123
        with (instance_create(0, 0, obj_persistentfadein))
124
            image_blend = fadecol;
125
        global.interact = 3;
126
        global.entrance = entrance;
127
        room_goto(roomtarg);
128
    }
129
}