Deltarune script viewer

← back to main script listing

gml_Object_obj_saucer_dining3Spawner_Step_0

(view raw script w/o annotations or w/e)
1
timer++;
2
if (dontalpha == 0)
3
    image_alpha += 0.2;
4
gravity = 1;
5
if (y > startY)
6
{
7
    y = startY;
8
    gravity = 0;
9
    if (room == room_dw_mansion_dininghall)
10
    {
11
        snd_stop(snd_impact);
12
        snd_play(snd_impact);
13
        instance_create(0, 0, obj_shake);
14
    }
15
}
16
if (y == startY && timer > 15)
17
{
18
    newsaucer = instance_create(x, y, obj_saucer);
19
    newsaucer.mode = 1;
20
    newsaucer.content = 0;
21
    with (newsaucer)
22
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
23
    instance_destroy();
24
}