Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_screen_channel_change_tester_Draw_0

(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_pressed(ord("B")) || gamepad_button_check_pressed(0, gp_face3))
4
    {
5
        background++;
6
        if (background >= 4)
7
            background = 0;
8
        with (obj_actor_tenna)
9
        {
10
            preset = irandom(37);
11
            if (preset >= 35)
12
                preset++;
13
        }
14
    }
15
}
16
if (background == 1)
17
    draw_sprite(spr_rhythmgame_bg, 4, 0, 0);
18
if (background == 2)
19
    draw_sprite_ext(bg_torhouse_bg, 0, -690, 0, 2, 2, 0, c_white, 1);
20
if (background == 3)
21
    draw_sprite_ext(spr_dw_susiezilla_bg_empty, 0, 0, 0, 2, 2, 0, c_white, 1);
22
with (obj_screen_channel_change)
23
{
24
    if (keyboard_check_pressed(ord("I")))
25
    {
26
        if (keyboard_check(vk_shift))
27
        {
28
            lifetime++;
29
            debug_print("lifetime: " + string(lifetime));
30
        }
31
        else
32
        {
33
            strength += 10;
34
            debug_print("stremgth: " + string(strength));
35
        }
36
    }
37
    else if (keyboard_check_pressed(ord("U")))
38
    {
39
        if (keyboard_check(vk_shift))
40
        {
41
            if (lifetime > 1)
42
                lifetime--;
43
            debug_print("lifetime: " + string(lifetime));
44
        }
45
        else if (strength > 0)
46
        {
47
            strength -= 10;
48
            debug_print("stremgth: " + string(strength));
49
        }
50
    }
51
    if (shader_check == 1)
52
    {
53
    }
54
    if (keyboard_check_pressed(ord("F")) || gamepad_button_check_pressed(0, gp_shoulderl) || gamepad_button_check_pressed(1, gp_shoulderl))
55
    {
56
        draw_end = !draw_end;
57
        if (draw_end)
58
            debug_print("1: effect handled in Draw End event");
59
        else
60
            debug_print("0: effect handled in Draw event");
61
    }
62
    if (keyboard_check_pressed(ord("B")) || gamepad_button_check_pressed(0, gp_face3) || gamepad_button_check_pressed(1, gp_face3))
63
        event_user(1);
64
    if (keyboard_check_pressed(ord("I")))
65
    {
66
        infinite = !infinite;
67
        if (infinite)
68
            timer = lifetime;
69
        debug_print("infinite: " + string(infinite));
70
    }
71
    if (keyboard_check_pressed(ord("V")) || gamepad_button_check_pressed(0, gp_face4) || gamepad_button_check_pressed(1, gp_face4))
72
    {
73
        scroll = !scroll;
74
        debug_print("scroll: " + string(scroll));
75
    }
76
}