Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_enemy_spear_Step_0

(view raw script w/o annotations or w/e)
1
if (place_meeting(x, y, obj_board_enemy_deer_ice_spell))
2
{
3
    instance_create(x, y, obj_board_enemydefeatsplash);
4
    snd_stop(snd_board_damage);
5
    snd_play(snd_board_damage);
6
    instance_destroy();
7
    exit;
8
}
9
timer++;
10
if (timer == 30 && sprite_index == spr_board_spear)
11
    instance_destroy();
12
if (timer == 90)
13
    instance_destroy();
14
if (sprite_index != spr_board_spear && sprite_index != spr_berdly_coaster_feather)
15
    image_index += 0.1;
16
updatetimer++;
17
if (updatetimer == 3)
18
    updatetimer = 0;
19
else
20
    exit;
21
image_index += 1;
22
for (i = 5; i > 0; i -= 1)
23
{
24
    remx[i] = remx[i - 1];
25
    remy[i] = remy[i - 1];
26
}
27
remx[0] = x;
28
remy[0] = y;
29
spd += acc;
30
x += lengthdir_x(spd, direction);
31
y += lengthdir_y(spd, direction);