(FIXED) Finishing a slam with pain anim (not fall)

NED

Well-known member
Is there a way to send enemy to a non-falling animation at the release @depost?

Something like that.

1- Grab - enemy grabed
2- P1 Slam - enemy slamed
3- P1 finish the slam - enemy go to a custom pain anim
4- enemy return to idle
 
Slam scripts you are using is based on falling opponent. If you want opponent to go to PAIN animation after being slammed, one way is to make fake PAIN animation using FALL animation. This FALL animation is paired with RISE animation and both uses pain frames to make it look like both are PAIN animation.
 
OK!
I was thinking of something like that, but I asked to be sure.

So the idea would be now:

1- Grab - enemy grabed
2- P1 Slam - enemy slamed
3- P1 finish the slam - enemy go to a custom fall anim (exemple 9) without high velocity
4- enemy go to custom rise anim (9)
5- enemy return to idle

I'll do it this way
Is it right?
 
Sorry, I mean you need to use matching RISE animation too. So if you use FALL9 for fake PAIN, you must have RISE9 too. I didn't set alternate RISE animations in Crime Buster since all FALL animations can use default RISE animation

So no need for extra parameter.
 
Ok, I get it about the number.

But, does a fall anim won't be cancelled once it hits ground?
If this fall anim have to display a "fake" pain anim, we don't have time to see it, right?
 
Ok, if I understand it right. the custom rise anim will display a "fake" anim of stand dizzy.

Also, if this works, how can I say to openbor wich fall anim to use?

As a reference, a part of slams tutorial :

@cmd  finish [1] [2] [3] [4] [5] [6] --- used to finish the slam
(use it at the end of the last slam frame)
(ex: @cmd    finish 25 2 -2 3 0 0)
[1] damage made by the slam (- less damage) (+ more damage)
[2] defines which FALL animation slammed opponent will play after slammed / 1 = Opponent plays FALL animation after being slammed / 2 = Plays FALL9 animation (ex: character's FALL9's, plays a simpler version of fall animation. This is used for Suplexs and most slam animation in which slammed opponent plays fallen poses).
[3]fall distance X axis -/+ <-  ->   
[4]fall altitude y axis -/+  down/up         
[5]fall depth z axis -/+    far/near       
[6] flips the fall animation 0 / 1

@cmd  throw [1] [2] [3] [4] [5] [6] – used to finish throw    (works just like finish for slam)
(use it at the end of the last slam frame)
(ex: @cmd    throw 35 1 4 2 0 0)
[1]  damadge made by the slam (- less damage) (+ more damage)
[2] works just like @cmd finish above, except there's another accepted value:
3 = Plays FALL2 animation
(Some enemies have FALL2 animations in which they auto recover from being thrown.)

[3] fall distance X axis -/+  <-  ->         
[4] fall altitude y axis -/+      down/up     
[5] fall depth z axis -/+        far / near     
[6] flips the fall animation 0 / 1 (0 = Doesn't change opponent's direction / 1 = Flip opponent's direction)   
 
That would require little script edit.

Here's original finish function:
void finish(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam or 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, 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);
  }
}

If you want to add more types just copy this line
Code:
     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL9")); // 2nd Finisher
     }
edit and paste it below the others
Code:
     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL9")); // 2nd Finisher
     }

     if(Type==3)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL10")); // 3rd Finisher
     }

You can add as many as you want but use different Type number and attacktype.
Same goes with throw function.
 
Thanks, I start to undertand how it works.

It seems my code is not perfect.

I'm creating a kind of wrestling headlock move (the move R-Mika uses in SFA3)
Basically it works this way:

1-Grab--->P2grabbed
2-Headlock squeeze and release--->P2custom sprites (headlocked)
3-idle--->P2plays fall15 and rise15

(fall15 is used as a transition in combination with rise15 to give the feeling enemy don't fall, but just go back from the headlocked anim.
It have to display a custom dizzy anim)

Th problem is the enemy continue to display headlocked (step2) when falling in fall15. before to hit the ground. What is wrong??

This is how it looks.
headlock1.jpg

anim change seems ignored.

As an info this is slam code
Code:
anim	freespecial37#Headlock (Hard attack UP)
	damageonlanding 0 1#l'enemi peut faire des indirect damage
	jugglecost	2#3
	attackone	1#0
	loop	0
	offset	96 177
	bbox	0 0 0 0

	delay	12#14

	hitfx	data/sounds/empty.wav
	hitflash      noflash
	grabin 1 40
	attack31   99 79 61 41 0 0 1 1 0 0#grab hit (TRICHER!!)
	frame	data/chars/rachel/headlo1.gif
	delay	1#pour la voix
	attack31	0 0 0 0 0 0
	frame	data/chars/rachel/headlo1.gif

      	@cmd    entergrab#############pour air grabs normalement
        @cmd    slamstart#2


#1 CYCLE
	delay	30
        @cmd    position 20 42 0 -1 0
	frame	data/chars/rachel/headlo1.gif#arme le coup

	delay	7#10
        @cmd    position 20 42 0 -1 0
	sound	data/chars/rachel/kiai3.wav
#	hitfx	data/sounds/strangle1.wav
#	hitflash      flash

#	attack	108 104 40 26 16 0 1 0 17 0#20 0

	frame	data/chars/rachel/headlo2.gif


	delay	4
#	attack1	0 0 0 0 0 0

	offset	95 177
        @cmd    position 21 42 0 -1 0
	sound	data/sounds/strangle1.wav
	frame	data/chars/rachel/headlo3.gif

	offset	96 177
        @cmd    position 20 42 0 -1 0
	frame	data/chars/rachel/headlo3.gif

	offset	95 177
        @cmd    position 21 42 0 -1 0
	frame	data/chars/rachel/headlo3.gif

	offset	96 177
        @cmd    position 20 42 0 -1 0
	frame	data/chars/rachel/headlo3.gif

	offset	95 177
        @cmd    position 21 42 0 -1 0
	frame	data/chars/rachel/headlo3.gif

	offset	96 177
        @cmd    position 20 42 0 -1 0
	frame	data/chars/rachel/headlo3.gif

	offset	95 177
        @cmd    position 21 42 0 -1 0
	frame	data/chars/rachel/headlo3.gif

	offset	96 177
        @cmd    position 20 42 0 -1 0
	frame	data/chars/rachel/headlo3.gif

	offset	95 177
        @cmd    position 21 42 0 -1 0
	frame	data/chars/rachel/headlo3.gif

	delay	20
	offset	96 177
        @cmd    position 20 42 0 -1 0
	frame	data/chars/rachel/headlo3.gif



	#new relache
	delay	20
	offset	96 177
	@cmd   depost 0
        @cmd    finish 99 4 -1.7 1.7 0 0
#####      @cmd    throw 99 1 -2.2 2.2 0 1
	frame	data/chars/rachel/headlo4.gif

gethit anims of enemy:
Code:
#--------------------------------------------------------------------
anim	fall15# transition pour faux dizzy pour finish certains slams
#      hitfx   data/sounds/indirect.wav
	quakeframe	1 1 -11
	loop	0
	landframe	2
	forcedirection	1
	delay	15
	offset	96 177
	bbox	46 61 91 104
	attack	46 61 91 104 5 1 1 0 6 20
	sound	data/chars/mex/mex_dam2.wav
	frame	data/chars/mex/fall1.gif
	bbox	38 84 124 73
	attack	38 84 124 73 5 1 1 0 6 20
	delay	300
	frame	data/chars/mex/fall2.gif
	delay	40
	bbox	36 132 139 54
	attack	0 0 0 0
	frame	data/chars/mex/fall4.gif
#--------------------------------------------------------------------
anim	rise15# faux dizzy pour finish certains slams
	loop	0
   	offset   96 177
	bbox	67 58 61 122

	subentity	stun0001
	spawnframe	1 0 2 90 0#1 0 0 0 0

  	 delay   20#30#100#15
   	frame   data/chars/mex/pain2.gif
  	delay   25#40
  	frame   data/chars/mex/pain1.gif
  	 delay   30
   	frame   data/chars/mex/pain2.gif
  	delay   25
  	frame   data/chars/mex/pain1.gif
  	delay   60
  	frame   data/chars/mex/pain2.gif
#--------------------------------------------------------------------

The script part about it (as I edited it) finish + throw @commands
Code:
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
     }

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

     if(Type==4)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL15")); // 4th Finisher
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);
   }
}

Code:
     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
     }

     if(Type==4)
     {
       damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL15")); // 4th Finisher
     }

     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 ;)
   }
}
 
(sigh) I knew this would happen  :-[

Alright, Plan B.
Now, change the added lines in finish to this:
if(Type==4)
    {
      damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL")); // 4th Finisher
      changeentityproperty(target, "animation", openborconstant("ANI_FALL15"));
    }
Change the one in throw also to this:
if(Type==4)
    {
      damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL")); // 4th Finisher
      changeentityproperty(target, "animation", openborconstant("ANI_FALL15"));
    }

HTH
 
Back
Top Bottom