Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_lawnmower_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    mysolid = instance_create(x, y, obj_board_solid);
4
    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
5
    {
6
    }
7
    init = 1;
8
}
9
if (active)
10
{
11
    if (speed > 0)
12
    {
13
        movingtimer++;
14
        if ((movingtimer % 2) == 0)
15
        {
16
            snd_stop(snd_board_torch);
17
            snd_play_pitch(snd_board_torch, 1 + (speed / 10));
18
        }
19
        image_speed = 0.5;
20
        if (place_meeting(x + hspeed, y + vspeed, obj_board_solidenemy))
21
        {
22
            image_speed = 0.1;
23
            myinteract = 0;
24
            x = round(x / 32) * 32;
25
            y = round(y / 32) * 32;
26
            hspeed = 0;
27
            vspeed = 0;
28
            snd_play(snd_board_door_close);
29
            movingtimer = 0;
30
        }
31
    }
32
}
33
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();