Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_chefs_food_Step_1

(view raw script w/o annotations or w/e)
1
if (i_ex(obj_tenna_minigame_ui) && y < (cameray() + 0))
2
    depth = obj_tenna_minigame_ui.depth - 1;
3
if (!on_fire)
4
    hspeed = clamp_gradual(hspeed, 0, 0, 1);
5
if (obj_chefs_game.gameover)
6
{
7
    speed = 0;
8
    exit;
9
}
10
if (thrown)
11
{
12
    if (fixate > 0 && instance_exists(fixate))
13
    {
14
        y = fixate.y + fixate_y;
15
        x = fixate.x;
16
    }
17
}
18
if (y >= floor_y && (!thrown || on_fire || falling))
19
{
20
    y = floor_y;
21
    obj_chefs_game.foodwasted++;
22
    instance_destroy();
23
    exit;
24
}
25
if (y > (room_height + 30) && thrown)
26
{
27
    obj_chefs_game.foodwasted++;
28
    instance_destroy();
29
}
30
if (caught)
31
    exit;
32
if (!falling && y < -16)
33
{
34
    falling = true;
35
    vspeed = fallspeed;
36
    x = 320 + (irandom(112) * choose(-1, 1));
37
    y = -16;
38
    instance_create_depth(x, 16, -10, obj_chefs_foodnotice);
39
}
40
if (falling)
41
{
42
    fallspeed = 3 + (1 * ((90 - obj_chefs_game.timer) / 60));
43
    vspeed = fallspeed;
44
}