|
1
|
scr_depth_boardscr_depth_board
function scr_depth_board()
{
depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10));
}
function scr_board_depth()
{
scr_depth_board();
} ();
|
|
2
|
hitbuff--;
|
|
3
|
if (place_meeting(x, y, obj_board_swordhitbox) && hitbuff <= 0)
|
|
4
|
{
|
|
5
|
hitbuff = 10;
|
|
6
|
scr_shakeobjscr_shakeobj
function scr_shakeobj()
{
var _shakeobj = instance_create(x, y, obj_shakeobj);
_shakeobj.target = id;
if (argument_count >= 1)
{
if (i_ex(argument0))
_shakeobj.target = argument0;
}
if (argument_count >= 2)
{
if (argument1 != -1)
_shakeobj.shakeamt = argument1;
}
if (argument_count >= 3)
{
if (argument2 != -1)
_shakeobj.shakereduct = argument2;
}
with (_shakeobj)
event_user(0);
} ();
|
|
7
|
snd_play_pitch(snd_damage_bc, 1.2);
|
|
8
|
myhealth--;
|
|
9
|
if (myhealth == 0)
|
|
10
|
{
|
|
11
|
instance_create(centerx(), centery(), obj_board_enemydefeatsplash);
|
|
12
|
instance_destroy();
|
|
13
|
}
|
|
14
|
}
|