Thank you guys
nedflandeurse said:
Great gameplay.
Feels better and better!
About your back grab system.
Is this something you can implement in few enemies only?
I would like to give this feature to few of my big guys enemies.
Mind to share your code?
Keep it up.
This project will be something great! 8)
For making an alternate move if you are back from enemy, i have just edited this old riseattack function from Bloodbane like this:
Code:
void riseattack3(int Rx, int Rz, void Ani)
{// Riseattack with range check
void self = getlocalvar("self");
void target = findtarget(self); //Get nearest player
float x = getentityproperty(self, "x");
float z = getentityproperty(self, "z");
int Dir = getentityproperty(self,"direction");
int TDir = getentityproperty(target,"direction");
if(target!=NULL()){
float Tx = getentityproperty(target, "x");
float Tz = getentityproperty(target, "z");
float Disx = Tx - x;
float Disz = Tz - z;
if(Disx < 0){
Disx = -Disx;
}
if(Disz < 0){
Disz = -Disz;
}
if( Disx <= Rx && Disz <= Rz && Dir == TDir) // Target within range?
{
changeentityproperty(self, "animation", openborconstant(Ani)); //Change the animation
}
}
}
I have just added direction and target direction check on it and it worked.
You can use it like this:
anim attack1
range 45 69
rangea 0 49
loop 0
delay 10
offset 77 170
bbox 60 55 40 100
@cmd riseattack3 69 45 "ANI_FOLLOW19"
frame data/chars/roper/w4.gif
frame data/chars/roper/a1.gif
attack 90 68 60 34 4 0
dropv 3.5 1.5
delay 20
frame data/chars/roper/a2.gif
attack 0 0 0 0 0
delay 10
frame data/chars/roper/a3.gif
This is working on both player/enemy.
Notice, this is just to start an alternate move from back. If you will try to perform an alternate grab move with this,
but your opponent have changed in meantime direction, you will need then an other script to check the opponents direction and then allow the grab.
For grabbing lying down opponents with alternate moves depend on their direction, this above will be enough.