Deltarune (Chapter 3) script viewer

← back to main script listing

gml_GlobalScript_scr_enemyhurt_tired_after_damage

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

function
scr_enemyhurt_tired_after_damage(arg0)
{ if (global.monsterhp[myself] <= (global.monstermaxhp[myself] * arg0))
scr_monster_make_tired(myself);
}
(arg0)
2
{
3
    if (global.monsterhp[myself] <= (global.monstermaxhp[myself] * arg0))
4
        
scr_monster_make_tired
scr_monster_make_tired

function
scr_monster_make_tired(arg0)
{ if (image_alpha > 0) { if (global.monsterstatus[arg0] == 0) { __tiredwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] - (global.hittarget[arg0] * 20)) + 20, obj_dmgwriter); __tiredwriter.type = 13; global.hittarget[arg0] += 1; snd_play_x(snd_spellcast, 0.5, 0.9); } global.monstercomment[arg0] = stringsetloc(
(Tired)
"(Tired)", "scr_monster_make_tired_slash_scr_monster_make_tired_gml_1_0"
);
global.monsterstatus[arg0] = 1; } }
(myself);
5
}