Gurtag
Member
hey guys i have frankesteined this script, i still strugle to understand the basics of it.. i am terrible at undestanding its logic . . anyway since i cant get it to work i wanted to ask for help...
my idea is to spawn say entity in follow# and with diferent health that its standard one, it get spawned fine and in follow# as intended but the health doesnt seem to work...
this is my code so far
my idea is to spawn say entity in follow# and with diferent health that its standard one, it get spawned fine and in follow# as intended but the health doesnt seem to work...
this is my code so far
Code:
void spawnhealthani(void vName, float fX, float fY, float fZ, int maxhealth, void Ani)
{
void self = getlocalvar("self");
void vSpawn;
int iDirection = getentityproperty(self, "direction");
clearspawnentry();
setspawnentry("name", vName);
if (iDirection == 0){
fX = -fX;
}
fX = fX + getentityproperty(self, "x"); //Get X location and add adjustment.
fY = fY + getentityproperty(self, "a"); //Get Y location and add adjustment.
fZ = fZ + getentityproperty(self, "z"); //Get Z location and add adjustment.
vSpawn = spawn();
changeentityproperty(vSpawn, "position", fX, fZ, fY);
changeentityproperty(vSpawn, "direction", iDirection);
changeentityproperty(vSpawn, "maxhealth", maxhealth);
performattack(vSpawn, openborconstant(Ani));
return vSpawn;
}