Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shutta_photo_controller_Collision_obj_monsterparent

(view raw script w/o annotations or w/e)
1
if (state == "capture")
2
{
3
    array_push(subjects, other.id);
4
    with (other)
5
    {
6
        
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, 10);
7
        if (global.monsterstatus[myself] != 1)
8
            
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);
9
    }
10
    endmessage = message_nicephoto;
11
}