Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_bullettester_Step_0

(view raw script w/o annotations or w/e)
1
if (global.mnfight != 2)
2
{
3
    global.hp[1] = 999;
4
    if (button1_p())
5
    {
6
        go = 1;
7
        global.myfight = -1;
8
        global.bmenuno = 0;
9
    }
10
    if (go)
11
        timer++;
12
    if (timer >= 1)
13
    {
14
        global.mnfight = 2;
15
        global.myfight = -1;
16
        if (!instance_exists(obj_growtangle))
17
            instance_create(__view_get(e__VW.XView, 0) + 320, __view_get(e__VW.YView, 0) + 170, obj_growtangle);
18
        if (!instance_exists(obj_heart))
19
            
scr_moveheart
scr_moveheart

function
scr_moveheart()
{ global.inv = 0; return instance_create(obj_herokris.x + 10, obj_herokris.y + 40, obj_moveheart); }
();
20
        for (i = 1; i < 5; i++)
21
            global.hp[i] = global.maxhp[i];
22
        timer = 0;
23
        go = 0;
24
    }
25
}
26
if (global.turntimer >= 2)
27
    global.myfight = -1;
28
if (keyboard_check_pressed(vk_tab))
29
{
30
    if (window_get_width() == 1280)
31
        window_set_size(640, 480);
32
    else
33
        window_set_size(1280, 960);
34
}
35
if (!keyboard_check_direct(vk_shift))
36
{
37
    if (keyboard_check_pressed(ord("1")))
38
    {
39
        if (global.monster[0] == 0)
40
            global.monster[0] = 1;
41
        else if (
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
() > 1)
42
            global.monster[0] = 0;
43
    }
44
    if (keyboard_check_pressed(ord("2")))
45
    {
46
        if (global.monster[1] == 0)
47
            global.monster[1] = 1;
48
        else if (
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
() > 1)
49
            global.monster[1] = 0;
50
    }
51
    if (keyboard_check_pressed(ord("3")))
52
    {
53
        if (global.monster[2] == 0)
54
            global.monster[2] = 1;
55
        else if (
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
() > 1)
56
            global.monster[2] = 0;
57
    }
58
}
59
change = 1;
60
if (keyboard_check_direct(vk_shift))
61
    change = 10;
62
if (keyboard_check_pressed(219))
63
    global.monsterinstance[0].spawntype -= change;
64
if (keyboard_check_pressed(221))
65
    global.monsterinstance[0].spawntype += change;
66
if (keyboard_check_pressed(186))
67
    global.monsterinstance[1].spawntype -= change;
68
if (keyboard_check_pressed(222))
69
    global.monsterinstance[1].spawntype += change;
70
if (keyboard_check_pressed(190))
71
    global.monsterinstance[2].spawntype -= change;
72
if (keyboard_check_pressed(191))
73
    global.monsterinstance[2].spawntype += change;
74
if (keyboard_check_pressed(ord("4")))
75
{
76
    if (neverendingturn == 0)
77
    {
78
        neverendingturn = 1;
79
        global.turntimer = 99999;
80
    }
81
    else
82
    {
83
        neverendingturn = 0;
84
        global.turntimer = 240;
85
    }
86
}
87
if (keyboard_check_pressed(vk_space) || keyboard_check_pressed(ord("R")))
88
{
89
    snd_free_all();
90
    room_restart();
91
}
92
if (keyboard_check_pressed(ord("I")))
93
    global.tempflag[27]++;
94
if (keyboard_check_pressed(ord("U")) && global.tempflag[27] > 0)
95
    global.tempflag[27]--;
96
if (keyboard_check(vk_shift) && keyboard_check_pressed(ord("1")))
97
{
98
    var newvalue = get_string("Enter Attack #1 number | current=" + string(string(global.monsterinstance[0].spawntype)), "");
99
    global.monsterinstance[0].spawntype = real(newvalue);
100
}
101
if (keyboard_check(vk_shift) && keyboard_check_pressed(ord("2")))
102
{
103
    var newvalue = get_string("Enter Attack #2 number | current=" + string(string(global.monsterinstance[1].spawntype)), "");
104
    global.monsterinstance[1].spawntype = real(newvalue);
105
}
106
if (keyboard_check(vk_shift) && keyboard_check_pressed(ord("3")))
107
{
108
    var newvalue = get_string("Enter Attack #3 number | current=" + string(string(global.monsterinstance[2].spawntype)), "");
109
    global.monsterinstance[2].spawntype = real(newvalue);
110
}
111
if (keyboard_check(vk_shift) && keyboard_check(vk_control) && keyboard_check_pressed(ord("I")))
112
{
113
    var inst = get_string("enter instance name", "");
114
    var _xx = get_string("enter X position", string(camerax() + 320));
115
    var _yy = get_string("enter Y position", string(cameray() + 240));
116
    var __depth = get_string("enter depth", 0);
117
    if (inst != -1)
118
        instance_create_depth(real(_xx), real(_yy), real(__depth), asset_get_index(inst));
119
}
120
if (keyboard_check_pressed(vk_numpad3))
121
{
122
    if (room_speed == 30)
123
        room_speed = 5;
124
    else
125
        room_speed = 30;
126
}
127
if (keyboard_check_pressed(vk_backspace))
128
    drawdebug = 1 - drawdebug;
129
if (keyboard_check_pressed(ord("B")))
130
    room_goto(room_bullettest_new);
131
global.tempflag[20] = global.monster[0];
132
global.tempflag[21] = global.monster[1];
133
global.tempflag[22] = global.monster[2];
134
global.tempflag[23] = global.monsterinstance[0].spawntype;
135
global.tempflag[24] = global.monsterinstance[1].spawntype;
136
global.tempflag[25] = global.monsterinstance[2].spawntype;
137
138
enum e__VW
139
{
140
    XView,
141
    YView,
142
    WView,
143
    HView,
144
    Angle,
145
    HBorder,
146
    VBorder,
147
    HSpeed,
148
    VSpeed,
149
    Object,
150
    Visible,
151
    XPort,
152
    YPort,
153
    WPort,
154
    HPort,
155
    Camera,
156
    SurfaceID
157
}