Backstab?backstab animation
O Ilusionista said:Backstab?backstab animation
nedflandeurse said:I think BB says the script automatically send player to a custom slam.
There is no actual back grabbing system.
But, it still can be simulated.
If only I knew it when I created the roots of my game system. ???
Really it just boils down to direction checking to decide what to do and a little positioning math for the binding.
Bloodbane said:For this, I highly recommend having custom scripted grab system before having grabbing from back
I have function to grab enemy from behind but after enemy is grabbed, player immediately enters backstab animation so there's no control until the move is done
I'll share it if you want to but I'm thinking that you actually want to be able to backgrab like in SoR series
I think BB says the script automatically send player to a custom slam.
There is no actual back grabbing system.
I was just thinking of having a script that changes grabbed enemy direction if grabbed during turn animation. I guess that wouldn't work?
I'm having a problem with enemies going on top of walls when slammed right next to a wall. I tried antiwall script but maybe I'm using it wrong.
anim grabbackward
attackone 0
loop 0
offset 100 149
sound data/sounds/
delay 30
@cmd slamstart
@cmd antiwall -25 30 -1
@cmd position 0 5 20 0 -1
flipframe 1
frame data/chars/norton/athrow1.gif
@cmd antiwall -25 30 -1
@cmd position 1 5 40 0 1
delay 15
frame data/chars/norton/throw2.gif
@cmd antiwall -25 30 -1
@cmd position 2 50 30 0 1
delay 15
sound data/sounds/punch1.wav
frame data/chars/norton/throw2.gif
@cmd depost 0
@cmd throw 15 3 1 2 0 0
@cmd clearL
frame data/chars/norton/throw2.gif
void backstabber(void Ani , int RxMin, int RxMax, int Rz, int Flag)
{// Checks closest enemy's animation & range for Shannon's backstab
// If it's accepted, change animation
// Ani : Animation to change to
// RxMin : Minimum x range
// RxMax : Maximum x range
// Rz : z range
// Flag : 0 = facing direction not necessary, 1 = facing direction must same, -1 = facing direction must be opposite
/*Originally smartbomb by
Damon Vaughn Caskey
07152008*/
void self = getlocalvar("self"); //Caller.
float x = getentityproperty(self, "x");
float z = getentityproperty(self, "z");
int dir = getentityproperty(self, "direction");
void vEntity; //Target entity placeholder.
int iEntity; //Entity enumeration holder.
int iType; //Entity type.
int iMax = openborvariant("ent_max"); //Entity count.
int iHP;
//Enumerate and loop through entity collection.
for(iEntity=0; iEntity<iMax; iEntity++){
vEntity = getentity(iEntity); //Get target entity from current loop.
iType = getentityproperty(vEntity, "type"); //Get target type.
iHP = getentityproperty(vEntity, "health"); //Get health
//Enemy type?
if (iType == openborconstant("TYPE_ENEMY") && iHP > 0){
float Tx = getentityproperty(vEntity, "x");
float Tz = getentityproperty(vEntity, "z");
int Edir = getentityproperty(vEntity, "direction");
float Disx = Tx - x;
float Disz = Tz - z;
if(Disz < 0){
Disz = -Disz;
}
if(Disx >= RxMin && Disx <= RxMax && Disz <= Rz && dir == 1){
if((Flag == 1 && Edir == 1) || Flag == 0){
changeentityproperty(self, "opponent", vEntity);
performattack(self, openborconstant(Ani));
}
} else if(Disx >= -RxMax && Disx <= -RxMin && Disz <= Rz && dir == 0){
if((Flag == 1 && Edir == 0) || Flag == 0){
changeentityproperty(self, "opponent", vEntity);
performattack(self, openborconstant(Ani));
}
}
}
}
}
void antiwall(int Dist, int Move, int Distz)
{// Checks if there is wall at defined distance
// If there is wall, entity will be moved away with defined movement
void self = getlocalvar("self");
int Direction = getentityproperty(self, "direction");
int x = getentityproperty(self, "x");
int z = getentityproperty(self, "z");
float H;
float Hz;
if (Direction == 0){ //Is entity facing left?
Dist = -Dist; //Reverse Dist to match facing
Move = -Move; //Reverse Move to match facing
}
H = checkwall(x+Dist,z);
Hz = checkwall(x+Dist,z+Distz);
if(Hz > 0)
{
changeentityproperty(self, "position", x, z-Distz);
}
if(H > 0)
{
changeentityproperty(self, "position", x+Move);
}
}
grabflip {value}
~This command sets how grabber faces grabbed target
1 = Grabber will flip to face target
2 = Target will flip to face grabber
3 = Combination of 1 & 2 (default)
~Use this together with grab ability of course
grabflip {value}
~This command sets how grabber faces grabbed target
1 = Grabber will flip to face target
2 = Target will flip to face grabber
3 = Combination of 1 & 2 (default)
~Use this together with grab ability of course
Bloodbane said:It is a function to be added in animation script you are using
As for crash, how exactly you use this function and what did log say? (the real error message is somewhere above end line so you need to look for it)
Joshiro said:Now is their a way to make the enemy turn a little slower?