hello
ive made a change in the killgun script to clean the entityvar num...
but I cant find out if the variable is still there or gone after using the killgun script
@cmd killgun 1 0
in the slamstart script i know the variable is killed after using the finish script
otherwise the enemy would not bind the player after the player died all lives and continued throw credits... this without using ClearL on enemy idle...
but in the killgun script i cant find out if the entityvar Num is clean ?
@cmd finish
ive made a change in the killgun script to clean the entityvar num...
but I cant find out if the variable is still there or gone after using the killgun script
@cmd killgun 1 0
void killgun(int Num, int Flag)
{ // Kill bound gun based on number
void self = getlocalvar("self");
void Gun = getentityvar(self, Num);
if(Gun!=NULL()){
bindentity(Gun, NULL());
if(Flag==1){
damageentity(Gun, self, 10000, 0, openborconstant("ATK_NORMAL"));
setentityvar(self, Num, NULL());
} else {
killentity(Gun);
setentityvar(self, Num, NULL());
}
}
}
in the slamstart script i know the variable is killed after using the finish script
otherwise the enemy would not bind the player after the player died all lives and continued throw credits... this without using ClearL on enemy idle...
but in the killgun script i cant find out if the entityvar Num is clean ?
@cmd finish
void finish(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam finisher
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
int SDir = getentityproperty(target,"direction");
int MDir;
if(Face==0){ // Same facing?
MDir = SDir;
}
if(Face==1){ // Opposite facing?
if(SDir==0){ // Facing left?
MDir = 1;
} else { MDir = 0;}
}
if(target==NULL())
{
target = getentityproperty(self, "grabbing");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
int dir = getentityproperty(target,"direction"); //Get opponent's facing direction
if(dir==0){ // Facing left?
x = -x;
}
if(Type==1)
{
damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL")); // 1st Finisher
}
if(Type==2)
{
damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL9")); // 2nd Finisher
}
tossentity(target, y, x, z); // Toss opponent
changeentityproperty(target, "direction", MDir);
setlocalvar("Target"+self, NULL()); //Clears variable
}
}