Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_plat_pausing

(view raw script w/o annotations or w/e)
1
function scr_pause_plat_bullet()
2
{
3
    if (!paused && !custom_paused)
4
    {
5
        paused_dir = direction;
6
        paused_spd = speed;
7
        paused_spr = sprite_index;
8
        paused_img = image_index;
9
        paused_imgspd = image_speed;
10
        paused_grav = gravity;
11
        paused = 1;
12
    }
13
    speed = 0;
14
    gravity = 0;
15
    image_speed = 0;
16
}
17
18
function scr_unpause_plat_bullet()
19
{
20
    if (paused || custom_paused)
21
    {
22
        paused = 0;
23
        custom_paused = 0;
24
        direction = paused_dir;
25
        speed = paused_spd;
26
        sprite_index = paused_spr;
27
        image_index = paused_img;
28
        image_speed = paused_imgspd;
29
        gravity = paused_grav;
30
    }
31
}
32
33
function scr_pause_plat_entity()
34
{
35
    if (!paused && !custom_paused)
36
    {
37
        paused_dir = direction;
38
        paused_spd = speed;
39
        paused_spr = sprite_index;
40
        paused_img = image_index;
41
        paused_imgspd = image_speed;
42
        paused = 1;
43
    }
44
    speed = 0;
45
    gravity = 0;
46
    image_speed = 0;
47
}
48
49
function scr_unpause_plat_entity()
50
{
51
    if (paused || custom_paused)
52
    {
53
        paused = 0;
54
        custom_paused = 0;
55
        direction = paused_dir;
56
        speed = paused_spd;
57
        sprite_index = paused_spr;
58
        image_index = paused_img;
59
        image_speed = paused_imgspd;
60
        gravity = entity_gravity;
61
        if (object_index == obj_plat_player && attacking)
62
            image_speed = 1;
63
    }
64
}