dantedevil
Well-known member
I have been researching and browsing the forum, but I have not been able to find information about it. 
My idea is to modify this script, so that when it inflicts damage on the opponent, it forces him to change the palette, for the one we want.
It would be something like:
@cmd hurtRemap 20 2
Damage 20, remap 2.
I have made several attempts on my own, but I am not very clear about the parameters to modify the script.
My idea is to modify this script, so that when it inflicts damage on the opponent, it forces him to change the palette, for the one we want.
It would be something like:
@cmd hurtRemap 20 2
Damage 20, remap 2.
C++:
void hurt(int Damage)
{ // Damage without altering opponent's animation + less damage if opponent has less health
// Mainly used for slams
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "grabbing");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
int THealth = getentityproperty(target,"health"); //Get target's health
int TAniPos = getentityproperty(target,"animpos"); //Get target's animation frame
if(THealth > Damage)
{
damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL7")); // Damage target with desired damage
updateframe(target, TAniPos);
} else {
int Damage2 = THealth - 1;
damageentity(target, self, Damage2, 1, openborconstant("ATK_NORMAL7")); //Damage target with less damage
updateframe(target, TAniPos);
}
}
}
I have made several attempts on my own, but I am not very clear about the parameters to modify the script.
