Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_tenna_object_falls_Step_0

(view raw script w/o annotations or w/e)
1
if (type == 0)
2
{
3
    if (x < (camerax() + 40))
4
        x = cameray() + 40;
5
    if (x > (cameray() + 600))
6
        x = cameray() + 600;
7
}
8
if (y < (cameray() + 240))
9
    y = cameray() + 240;
10
if (i_ex(obj_tenna_zoom) && obj_tenna_zoom.con >= 2 && obj_tenna_zoom.minigameinsanity == false)
11
    instance_destroy();
12
if (con == 0)
13
{
14
    timer++;
15
    image_xscale = lerp(image_xscale, 0.7, 0.2);
16
    image_yscale = lerp(image_yscale, 0.7, 0.2);
17
    image_alpha = lerp(image_alpha, 0.5, 0.2);
18
    if (timer == 30)
19
    {
20
        timer = 0;
21
        con = 1;
22
    }
23
}
24
if (con == 1)
25
{
26
    timer++;
27
    if (timer == 1)
28
    {
29
        if (type == 0)
30
            obj = instance_create(x, y, obj_tenna_object_falls2);
31
        if (type == 1)
32
        {
33
            obj = instance_create(x + 52, cameray() + 200, obj_tenna_object_falls2);
34
            obj = instance_create(x + 52, cameray() + 250, obj_tenna_object_falls2);
35
            obj = instance_create(x + 52, cameray() + 300, obj_tenna_object_falls2);
36
        }
37
    }
38
    if (timer == 20)
39
        instance_destroy();
40
}