Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_rabbick_outline_Step_0

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

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
2
if (movecon == 0)
3
{
4
    image_speed = 0.1;
5
    direction = choose(90, 180, 270, 0);
6
    speed = 1;
7
    move_timer = 30 + random(30);
8
    movecon = 1;
9
}
10
if (movecon == 1)
11
{
12
    move_timer--;
13
    if (move_timer <= 0)
14
    {
15
        movecon = 2;
16
        move_timer = 30 + random(180);
17
        hspeed = 0;
18
        vspeed = 0;
19
        image_speed = 0;
20
        image_index = round(image_index);
21
    }
22
}
23
if (movecon == 2)
24
{
25
    move_timer--;
26
    if (move_timer <= 0)
27
        movecon = 0;
28
}