Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_cutscene_master_Step_0

(view raw script w/o annotations or w/e)
1
if (initialized == 0)
2
    initialized = 1;
3
if (waiting == 0)
4
{
5
    for (i = current_command; i < maximum_command; i += 1)
6
    {
7
        command_actor[i] = actor_selected_id;
8
        _c = command[i];
9
        scr_cutscene_commands
scr_cutscene_commands

function scr_cutscene_commands() { if (_c == "delaycmd") { delaycmd = instance_create(0, 0, obj_cutscene_delaycmd); delaycmd.master_object = master_object; delaycmd.command_actor[0] = command_actor[i]; delaycmd.alarm[0] = command_arg1[i]; delaycmd._c = command_arg2[i]; delaycmd.command_arg1[0] = command_arg3[i]; delaycmd.command_arg2[0] = command_arg4[i]; delaycmd.command_arg3[0] = command_arg5[i]; delaycmd.command_arg4[0] = command_arg6[i]; if (instant) { delaycmd.alarm[0] = 0; delaycmd.instant = 1; with (delaycmd) event_user(0); } } if (_c == "walk") { if (!instant) { actor_move = instance_create(0, 0, obj_move_actor); actor_move.target = command_actor[i]; actor_move.direction_word = command_arg1[i]; actor_move.speed = command_arg2[i]; actor_move.time = command_arg3[i]; with (actor_move) event_user(8); } else { command_actor[i].x += lengthdir_x(command_arg2[i] * command_arg3[i], (scr_facing_letter_to_number(command_arg1[i]) * 90) - 90); command_actor[i].y += lengthdir_y(command_arg2[i] * command_arg3[i], (scr_facing_letter_to_number(command_arg1[i]) * 90) - 90); } } if (_c == "walkdirect") { if (!instant) { actor_move = instance_create(0, 0, obj_move_to_point); actor_move.target = command_actor[i]; actor_move.movex = command_arg1[i]; actor_move.movey = command_arg2[i]; actor_move.movemax = command_arg3[i]; if (command_arg1[i] == 0) actor_move.movex = command_actor[i].x; if (command_arg2[i] == 0) actor_move.movey = command_actor[i].y; } else { command_actor[i].x = command_arg1[i]; command_actor[i].y = command_arg2[i]; } } if (_c == "msgset") msgset(command_arg1[i], command_arg2[i]); if (_c == "msgnext") msgnext(command_arg1[i]); if (_c == "talk") { if (!instant) { mydialoguer = instance_create(0, 0, obj_dialoguer); if (msgside >= 0) mydialoguer.side = msgside; mydialoguer.zurasu = zurasu; } } if (_c == "msgface") scr_anyface(command_arg1[i], command_arg2[i], command_arg3[i]); if (_c == "msgfacenext") scr_anyface_next(command_arg1[i], command_arg2[i]); if (_c == "msgside") { if (command_arg1[i] == "any") msgside = -1; if (command_arg1[i] == "top") msgside = 0; if (command_arg1[i] == "bottom") msgside = 1; if (command_arg1[i] == "zurasuon") zurasu = 1; if (command_arg1[i] == "zurasuoff") zurasu = 0; } if (_c == "emote") { if (!instant) { command_actor[i].__arg0 = command_arg1[i]; command_actor[i].__arg1 = command_arg2[i]; command_actor[i].__arg2 = command_arg3[i]; if (command_arg3[i] == 0) { with (command_actor[i]) scr_emote(__arg0, __arg1); ...
();
10
        if (breakme == 1)
11
        {
12
            breakme = 0;
13
            break;
14
        }
15
    }
16
}
17
current_command = i + 1;
18
if (waiting == 1)
19
{
20
    if (cs_wait_amount > 0)
21
    {
22
        cs_wait_timer++;
23
        if (cs_wait_timer >= cs_wait_amount)
24
        {
25
            cs_wait_amount = 0;
26
            cs_wait_timer = 0;
27
            waiting = 0;
28
        }
29
    }
30
    if (cs_wait_box >= 0)
31
    {
32
        if (!i_ex(mydialoguer))
33
        {
34
            cs_wait_box = -1;
35
            waiting = 0;
36
        }
37
        else if (mydialoguer.active == 1)
38
        {
39
            if (i_ex(mydialoguer.writer))
40
            {
41
                if (mydialoguer.writer.msgno >= cs_wait_box)
42
                {
43
                    cs_wait_box = -1;
44
                    waiting = 0;
45
                }
46
            }
47
        }
48
    }
49
    if (cs_wait_dialogue == 1)
50
    {
51
        if (!i_ex(mydialoguer))
52
        {
53
            cs_wait_dialogue = 0;
54
            waiting = 0;
55
        }
56
    }
57
}
58
if (terminate_this_frame == 1)
59
{
60
    if (kill_actors == 1)
61
    {
62
        for (jj = 0; jj < 20; jj++)
63
        {
64
            with (actor_id[jj])
65
                instance_destroy();
66
        }
67
    }
68
    instance_destroy();
69
}