Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_grabbablebomb_Step_0

(view raw script w/o annotations or w/e)
1
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
2
if (grabcount > 0)
3
{
4
    bomb = instance_create(x, y, obj_board_bomb);
5
    bomb.fatal = false;
6
    bomb.con = 2;
7
    instance_destroy();
8
}
9
if (place_meeting(x, y, obj_board_hazard) || place_meeting(x, y, obj_board_puzzlebombbullet))
10
{
11
    cloud = instance_create(x + 6, y, obj_shadow_mantle_cloud);
12
    cloud.type = 0;
13
    cloud.fatal = false;
14
    cloud.depth = depth - 10;
15
    snd_stop(snd_board_bomb);
16
    snd_play(snd_board_bomb);
17
    instance_destroy();
18
}