Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dw_fcastle_cafe_Step_2

related scripts: Create_0Draw_0Other_11Other_12Other_13Other_15Step_0Step_1Step_2

(view raw script w/o annotations or w/e)
1
if (resetcamera == true)
2
{
3
    resetcameratimer++;
4
    if (resetcameratimer == 1)
5
        resetcamloc = scr_getcam();
6
    fadecaterpillars(1);
7
    var resetcamtime = 15;
8
    var cx = camerax();
9
    var cy = cameray();
10
    var targ = 
scr_darkcameraideal
scr_darkcameraideal

function
scr_darkcameraideal()
{ with (obj_mainchara) { var __camera = { x: camerax(), y: cameray() }; var roomw = room_width; var roomh = room_height; var vieww = view_wport[0]; var viewh = view_hport[0]; var krx = initwd / 2; var kry = initht / 2; var nudger = instance_place(x, y, obj_camera_nudger); if (i_ex(nudger)) { if (nudger.lerpstrength != -4) nudgelerp = nudger.lerpstrength; var _yoff = -2; if (nudger.yamt > 0) _yoff = 2; var _xoff = -2; if (nudger.xamt > 0) _xoff = 2; nudgex = lerp(nudgex, nudger.xamt + _yoff, nudgelerp); nudgey = lerp(nudgey, nudger.yamt + _yoff, nudgelerp); nudgex = clamp(nudgex, abs(nudger.xamt) * -1, abs(nudger.xamt)); nudgey = clamp(nudgey, abs(nudger.yamt) * -1, abs(nudger.yamt)); } var camx = clamp((x - floor((vieww / 2) - krx)) + nudgex, 0, roomw - vieww); var camy = clamp((y - floor((viewh / 2) - kry)) + nudgey, 0, roomh - viewh); var clamper = instance_place(x, y, obj_camera_clamper); if (i_ex(clamper)) { var lclamp = 0; var rclamp = roomw - vieww; var uclamp = 0; var dclamp = roomh - viewh; if (clamper.xmin != -4) lclamp = clamper.xmin; if (clamper.xmax != -4) rclamp = clamper.xmax; if (clamper.ymin != -4) uclamp = clamper.ymin; if (clamper.ymax != -4) dclamp = clamper.ymax; camx = clamp(camx, lclamp, rclamp); camy = clamp(camy, uclamp, dclamp); } __camera.x = camx; __camera.y = camy; return __camera; } }
();
11
    var ease = 
12
    {
13
        x: round(lerp_out_cubic(resetcamloc.x, targ.x, resetcameratimer / resetcamtime)),
14
        y: round(lerp_out_cubic(resetcamloc.y, targ.y, resetcameratimer / resetcamtime))
15
    };
16
    camera_setxy(ease.x, ease.y);
17
    if (resetcameratimer >= resetcamtime)
18
    {
19
        with (obj_caterpillarchara)
20
            image_alpha = 1;
21
        with (obj_mainchara)
22
            image_alpha = 1;
23
        resetcamera = false;
24
        obj_mainchara.cutscene = false;
25
    }
26
}
27
if (updatedfriends == 1)
28
{
29
    if (global.interact == 0 && 
scr_trigcheck
scr_trigcheck

function
scr_trigcheck(arg0)
{ var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, obj_mainchara)) ____trig++; } } } return ____trig; } function scr_trigcheck_ext(arg0, arg1 = id) { var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, arg1)) ____trig++; } } } return ____trig; }
("friendupdate"))
30
    {
31
        global.interact = 1;
32
        updatedfriends = 2;
33
        
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 == "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 (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
34
        var dialoguerStrings = [];
35
        var lost1 = false;
36
        for (var i = 0; i < array_length(friendsgained); i++)
37
        {
38
            var str = stringsetsubloc(
* (You can now take a break with Argument №11!)Wait for input
"* (You can now take a break with ~1!)/", friendsgained[i], "obj_dw_fcastle_cafe_slash_Step_2_gml_88_0"
);
39
            if (i != 0)
40
                str = stringsetsubloc(
* (You can also take a break with Argument №11!)Wait for input
"* (You can also take a break with ~1!)/", friendsgained[i], "obj_dw_fcastle_cafe_slash_Step_2_gml_89_0"
);
41
            array_push(dialoguerStrings, str);
42
        }
43
        for (var i = 0; i < array_length(friendslost); i++)
44
        {
45
            var str = stringsetsubloc(
* (Due to your actions,Delay 11 Argument №11 won't hang out...)Wait for input
"* (Due to your actions^1, ~1 won't hang out...)/", friendslost[i], "obj_dw_fcastle_cafe_slash_Step_2_gml_95_0"
);
46
            if (i != 0)
47
                str = stringsetsubloc(
* (Argument №11 won't either...)Wait for input
"* (~1 won't either...)/", friendslost[i], "obj_dw_fcastle_cafe_slash_Step_2_gml_96_0"
);
48
            array_push(dialoguerStrings, str);
49
            if (!lost1)
50
            {
51
                
scr_msgno_func
scr_msgno_func

function
scr_msgno_func(arg0, arg1, arg2 = 0, arg3 = 0, arg4 = 30, arg5 = -4)
{ var __watcher = instance_create_depth(0, 0, 0, obj_msgno_func); __watcher.msgno = arg0; __watcher.dothing = arg1; __watcher.when = arg2; __watcher.functiontime = arg3; __watcher.doomer = arg4; __watcher.target = arg5; return __watcher; } function scr_msgfunc(arg0, arg1 = 0, arg2 = 0, arg3 = 30, arg4 = -4) { var __watcher = instance_create_depth(0, 0, 0, obj_msgno_func); __watcher.msgno = global.msgno; __watcher.dothing = arg0; __watcher.when = arg1; __watcher.functiontime = arg2; __watcher.doomer = arg3; __watcher.target = arg4; return __watcher; }
(array_length(dialoguerStrings) - 1, function()
52
                {
53
                    snd_play(snd_glassbreak);
54
                });
55
            }
56
        }
57
        global.msgno = 0;
58
        var count = array_length(dialoguerStrings);
59
        for (var i = 0; i < count; i++)
60
        {
61
            global.msg[i] = dialoguerStrings[i];
62
            if (i == (count - 1))
63
                global.msg[i] = dialoguerStrings[i] + "%";
64
        }
65
        d_make();
66
    }
67
}
68
if (updatedfriends == 2 && !d_ex())
69
{
70
    global.flag[1856] = currentresult_bitflagval;
71
    updatedfriends = 0;
72
    global.interact = 0;
73
}