|
1
|
function scr_weaken_enemiesscr_weaken_enemies
function scr_weaken_enemies()
{
for (i = 0; i < 3; i++)
{
if (!global.monster[i])
continue;
dm = instance_create(global.monsterx[i], (global.monstery[i] + 20) - (global.hittarget[i] * 20), obj_dmgwriter);
dm.damage = global.monsterhp[i] - 1;
var _miss = global.monsterhp[i] == 1;
global.monsterhp[i] = 1;
with (global.monsterinstance[i])
{
var _ex = instance_create(x + (sprite_width / 2), y + (sprite_height / 2), obj_animation_dx);
_ex.sprite_index = spr_realisticexplosion;
_ex.image_xscale = 2;
_ex.image_yscale = 2;
_ex.depth = obj_dmgwriter.depth + 1;
if (!_miss)
{
shakex = 9;
state = 3;
hurttimer = 30;
}
}
}
} ()
|
|
2
|
{
|
|
3
|
for (i = 0; i < 3; i++)
|
|
4
|
{
|
|
5
|
if (!global.monster[i])
|
|
6
|
continue;
|
|
7
|
dm = instance_create(global.monsterx[i], (global.monstery[i] + 20) - (global.hittarget[i] * 20), obj_dmgwriter);
|
|
8
|
dm.damage = global.monsterhp[i] - 1;
|
|
9
|
var _miss = global.monsterhp[i] == 1;
|
|
10
|
global.monsterhp[i] = 1;
|
|
11
|
with (global.monsterinstance[i])
|
|
12
|
{
|
|
13
|
var _ex = instance_create(x + (sprite_width / 2), y + (sprite_height / 2), obj_animation_dx);
|
|
14
|
_ex.sprite_index = spr_realisticexplosion;
|
|
15
|
_ex.image_xscale = 2;
|
|
16
|
_ex.image_yscale = 2;
|
|
17
|
_ex.depth = obj_dmgwriter.depth + 1;
|
|
18
|
if (!_miss)
|
|
19
|
{
|
|
20
|
shakex = 9;
|
|
21
|
state = 3;
|
|
22
|
hurttimer = 30;
|
|
23
|
}
|
|
24
|
}
|
|
25
|
}
|
|
26
|
}
|