DD Tokki
Well-known member
C:
void number()
{
void self = getlocalvar("self");
void f;
int damage = getlocalvar("damage");
int x, z, a, t;
int atkType = getlocalvar("attacktype");
if(damage > 0 && atkType != openborconstant("ATK_TIMEOVER"))
{
x = getentityproperty(self, "x")+4;
z = getentityproperty(self, "z")+1;
a = getentityproperty(self, "a")+40;
setspawnentry("name", "number");
while(damage)
{
t = damage % 10;
f = spawn();
changeentityproperty(f, "position", x,z,a);
updateframe(f, t);
damage/=10;
x -= 8;
}
}
}
This is the script I'm currently using in my game.
When you deal damage to an enemy, a numerical graphic appears.
It's a style from the Kunio-kun series.
However, I have a question.
This script doesn't display the numbers when the enemy's health is depleted.
If the attack is done in a different way (like Grab), the calculation stops as soon as it reaches 0.
If an attack with 300 damage reaches 0, it won't even display 100.
I'm wondering if it's possible to display the damage until the attack ends, even after health reaches 0.
Last edited:
