Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_tutorial_graze_Step_0

(view raw script w/o annotations or w/e)
1
xx = camerax();
2
yy = cameray();
3
if (con == 0)
4
{
5
    growtangle = instance_create(xx + 320, (yy + 240) - 80, obj_growtangle);
6
    timer = 0;
7
    puzboy = instance_create(xx + 320, ((yy + 240) - 80) + 32 + 20, obj_tutorial_puzboy);
8
    con++;
9
    xvar = xx + 320 + random_range(-30, 30);
10
}
11
if (con == 1)
12
{
13
    timer++;
14
    if (timer > 4 && (obj_tutorial_puzboy.x < 340 && obj_tutorial_puzboy.x > 300))
15
    {
16
        xvar = xx + 320;
17
        b = instance_create(xvar, yy + 80, obj_tutorial_bullet);
18
        b.direction = point_direction(b.x, b.y, puzboy.x, puzboy.y);
19
        b.speed = 5;
20
        b2 = instance_create(xvar, yy + 80, obj_tutorial_bullet);
21
        b2.direction = b.direction + 33;
22
        b2.speed = 5;
23
        b3 = instance_create(xvar, yy + 80, obj_tutorial_bullet);
24
        b3.direction = b.direction - 33;
25
        b3.speed = 5;
26
        b.image_angle = b.direction;
27
        b2.image_angle = b2.direction;
28
        b3.image_angle = b3.direction;
29
        b.depth = growtangle.depth - 5;
30
        b2.depth = growtangle.depth - 5;
31
        b3.depth = growtangle.depth - 5;
32
        timer = 0;
33
    }
34
}
35
if (!d_ex())
36
{
37
    with (puzboy)
38
        fade = true;
39
    if (i_ex(obj_tutorial_bullet))
40
    {
41
        with (obj_tutorial_bullet)
42
            fade = true;
43
    }
44
    growtangle.growcon = 3;
45
    instance_destroy();
46
}