Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_enemy_pricklycactus_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
    depth = 999990;
3
if (con == 1)
4
{
5
    if (i_ex(obj_mainchara_board))
6
        depth = obj_mainchara_board.depth - 80;
7
    timer = 0;
8
    con = 2;
9
}
10
if (con == 2)
11
{
12
    timer++;
13
    if (timer >= shottarget)
14
    {
15
        var shotnum = irandom_range(6, 9);
16
        for (var i = 0; i < shotnum; i++)
17
        {
18
            var bul = instance_create(x + 16, y + 16, obj_board_collidebullet);
19
            bul.direction = i * (360 / shotnum);
20
            bul.speed = 4;
21
            bul.friction = -0.1;
22
            bul.fadetime = 60;
23
            bul.updateangle = 1;
24
            bul.sprite_index = spr_bullet_laser_circle;
25
            bul.image_xscale = 0.8;
26
            bul.image_yscale = 0.25;
27
            bul.depth = depth + 10;
28
        }
29
        timer = irandom_range(-4, 4);
30
    }
31
}
32
if (con == 3)
33
{
34
    timer = 0;
35
    con = 0;
36
}