Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_treeEnemy_example_Step_0

(view raw script w/o annotations or w/e)
1
image_alpha = lerp(image_alpha, 1, 0.125);
2
timer++;
3
if (timer >= timertarg)
4
{
5
    if (i_ex(obj_heart))
6
    {
7
        bul = instance_create(x + 6, y + 14, obj_board_collidebullet);
8
        bul.sprite_index = spr_board_treeEnemyBullet;
9
        bul.direction = point_direction(x, y, obj_heart.x + 2, obj_heart.y + 2);
10
        bul.speed = 2;
11
        bul.friction = -0.25;
12
        bul.depth = depth - 10;
13
        
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(bul, 90);
14
        timer = 0;
15
        timertarg = random(30) + 15;
16
    }
17
}
18
if (timer > (timertarg - 5))
19
    image_index = 1;
20
else
21
    image_index = 0;