• All, I am currently in the process of migrating domain registrations. During this time there may be some intermittent outages or slowdowns. Please contact staff if you have any questions.

land safe in a script enemy throw

dantedevil

Well-known member
I using the scripts of "Crime Buster" and have some problems with the player anim land in enemy throws.
Here all the steps:
1-The enemy make the custom script throw with fall2.
2- The player play the fall 2 with the line:
@cmd    keyint "ANI_LAND" 0 "UJ" 0 0
3 - Player have the anim land with this settings:
bouncefactor 0
@cmd    beidle  (in the last frame).

Finally when the player use the anim land, sometimes stay frozen in the last frame. And some times work perfect. When the player stay frozen in the last frame, the openbor not crashes.
Any idea?


 
Yes, without @cmd beidle works fine.
But after the anim land the player plays a fall animation without the @cmd beidle.
Thats not good.
 
Ah, I just remembered something, beidle function from Crime Buster v2.5 is old and outdated, you must update it with this one:

void beidle()
{// Go to IDLE animation!
    void self = getlocalvar("self");

    setidle(self, openborconstant("ANI_IDLE"));
}
 
After the update the script a new error has come.
Sometime the player play the anim land and goes to idle, then he no moves and continues perform the idle and the enemies cant attack him
The other error comes when the enemies kill the player with the script throw, and the player performs the anim land in the same time. The energy bar shows empy and the player still alive and cant move and enemies cant hit him, with other new bug, he blink all the time.
 
Finally i find a solution!
I create a new way to make a safe land to escape throws. Using your original feature of Crime buster, i mix with the scripts of Rocket Viper 2 and work perfect.
Thanks!
 
Sorry, my last reply was from my smartphone.
I'm home now, so here the solution:

scripts courtesy of Bloodbane
Code:
void throw(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as throw 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, 0, 1, openborconstant("ATK_NORMAL")); // 1st throw type
     }

     if(Type==2)
     {
       damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL9")); // 2nd throw type
     }

     if(Type==3)
     {
       damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL2")); // 3rd throw type
     }

     changeentityproperty(target, "attacking", 1);
     changeentityproperty(target, "damage_on_landing", Damage);
     changeentityproperty(target, "projectile", 1);
     changeentityproperty(target, "direction", MDir);
     tossentity(target, y, x, z); // Toss opponent ;)
   }
}

void beidle()
{// Go to IDLE animation!
    void self = getlocalvar("self");

    setidle(self, openborconstant("ANI_IDLE"));
}

scripts from Rocket Viper 2 with some modifications
Code:
void recover()
{
	void self = getlocalvar("self");
	int	iPIndex = getentityproperty(self,"playerindex");
	void Health = getentityproperty(self,"health");
	void ijump = playerkeys(iPIndex, 0, "moveup","attack");
	if	(Health >= 1 && ijump){
		void mp=getentityproperty(self,"mp")+10;
		changeentityproperty(self,"mp",mp);
		changeentityproperty(self, "animation", openborconstant("ANI_LAND"));
	}
}

void noDropDamage()
{
	void self=getlocalvar("self");
	changeentityproperty(self,"damage_on_landing",0);
	changeentityproperty(self,"nograb",0);
	changeentityproperty(self,"aiflag","falling",0);
	changeentityproperty(self,"aiflag","drop",0);
	changeentityproperty(self,"aiflag","projectile",0);
	changeentityproperty(self,"takeaction", "common_attack_proc");
}

and finally the anim fall and the anim land
Code:
anim fall2
	loop	0
	 landframe  2
	 loop       0
	 offset     82 177
	 bbox		0 0 0 0
	 delay      1
	@cmd	recover
         frame      data/chars/midas/fall3.gif
	 delay      999
	@cmd	recover
	 attack     45 135 55 25 5 1 0 0 15
         frame      data/chars/midas/fall3.gif
	 delay      1
         frame      data/chars/midas/fall4.gif

anim land
	loop	0
        bouncefactor 0
        landframe 26
	delay	4
	offset	82 177
	bbox	0 0 0 0
	frame	data/chars/midas/spain1.gif
	@cmd	noDropDamage
	delay	2
	offset	82 197
	frame	data/chars/midas/roll2.gif
	frame	data/chars/midas/roll2.gif
	frame	data/chars/midas/roll2.gif
        sound   data/sounds/airpunch.wav
	frame	data/chars/midas/roll2.gif
	frame	data/chars/midas/roll3.gif
	frame	data/chars/midas/roll3.gif
	frame	data/chars/midas/roll3.gif
	frame	data/chars/midas/roll4.gif
	frame	data/chars/midas/roll4.gif
	frame	data/chars/midas/roll4.gif
        sound   data/sounds/airpunch.wav
	frame	data/chars/midas/roll5.gif
	frame	data/chars/midas/roll5.gif
	frame	data/chars/midas/roll5.gif
	frame	data/chars/midas/roll6.gif
	frame	data/chars/midas/roll6.gif
	frame	data/chars/midas/roll6.gif
        sound   data/sounds/airpunch.wav
	frame	data/chars/midas/roll7.gif
	frame	data/chars/midas/roll7.gif
	frame	data/chars/midas/roll7.gif
	frame	data/chars/midas/roll8.gif
	frame	data/chars/midas/roll8.gif
	frame	data/chars/midas/roll8.gif
        sound   data/sounds/airpunch.wav
	frame	data/chars/midas/roll1.gif
        sound   data/chars/midas/yaa2.wav
	frame	data/chars/midas/roll1.gif
        delay   999
	frame	data/chars/midas/roll1.gif
        delay   20
	offset	82 177
	frame	data/chars/midas/rise3.gif
        @cmd    beidle
	delay	1
	frame	data/chars/midas/rise3.gif

Works perfect, i hope this be useful.

See ya...
 
Back
Top Bottom