Undertale script viewer

← back to main script listing

gml_Object_obj_dmgwriter_Create_0

(view raw script w/o annotations or w/e)
1
stretchwidth = global.monsterinstance[global.mytarget].wd;
2
stretchfactor = stretchwidth / global.monstermaxhp[global.mytarget];
3
apparenthp = global.monsterhp[global.mytarget];
4
actualhp = global.monsterhp[global.mytarget];
5
maxhp = global.monstermaxhp[global.mytarget];
6
negative = 0;
7
special = 0;
8
dmg = global.damage;
9
alarm[0] = 1;
gml_Object_obj_dmgwriter_Alarm_0.gml

if (i == 0) i = 1; else i = 0; if (apparenthp > (actualhp - dmg)) apparenthp -= (dmg / 15); else apparenthp = actualhp - dmg; if (negative == 0) { if (apparenthp < 0) apparenthp = 0; } alarm[0] = 2;
10
i = 1;
11
if (dmg != 0)
12
{
13
    vspeed = -4;
14
    gravity = 0.5;
15
    gravity_direction = 270;
16
}
17
drawbar = 1;