Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_mainchara_board_KeyPress_32

(view raw script w/o annotations or w/e)
1
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
2
{
3
    if (keyboard_check(vk_control))
4
    {
5
        if ((name == "susie" && controlled == 1) || (name == "kris" && controlled == 1))
6
        {
7
            if (susierecordcon == 0)
8
            {
9
                var _kris = 0;
10
                with (obj_mainchara_board)
11
                {
12
                    if (name == "kris")
13
                        _kris = id;
14
                }
15
                recordsavex = x;
16
                recordsavey = y;
17
                susierecordcon = 1;
18
                susierecordsave = true;
19
            }
20
            else if (susierecordcon == 1)
21
            {
22
                susierecordcon = 2;
23
                susierecordcount = 0;
24
                x = recordsavex;
25
                y = recordsavey;
26
            }
27
            else if (susierecordcon == 2)
28
            {
29
                if (susierecordsave == true && show_question("Save gameplay recording?"))
30
                {
31
                    _string_save = get_string("Input file name:", "default");
32
                    ini_open("susieplayback.ini");
33
                    ini_write_string("Susie Playback Info", _string_save, susierecordstring);
34
                    ini_close();
35
                }
36
                else
37
                {
38
                }
39
                susierecordcon = 0;
40
                susierecordcount = 0;
41
                susierecordstring = "";
42
            }
43
        }
44
        if (name == "ralsei" && controlled == 1)
45
        {
46
            if (susierecordcon == 0)
47
            {
48
                var _kris = 0;
49
                with (obj_mainchara_board)
50
                {
51
                    if (name == "kris")
52
                        _kris = id;
53
                }
54
                _kris.x = x;
55
                _kris.y = y;
56
                recordsavex = x;
57
                recordsavey = y;
58
                susierecordcon = 1;
59
                susierecordsave = true;
60
            }
61
            else if (susierecordcon == 1)
62
            {
63
                susierecordcon = 2;
64
                susierecordcount = 0;
65
                x = recordsavex;
66
                y = recordsavey;
67
            }
68
            else if (susierecordcon == 2)
69
            {
70
                if (susierecordsave == true && show_question("Save gameplay recording?"))
71
                {
72
                    _string_save = get_string("Input file name:", "default");
73
                    ini_open("susieplayback.ini");
74
                    ini_write_string("Susie Playback Info", _string_save, susierecordstring);
75
                    ini_close();
76
                }
77
                else
78
                {
79
                }
80
                susierecordcon = 0;
81
                susierecordcount = 0;
82
                susierecordstring = "";
83
            }
84
        }
85
    }
86
}