Grabbing only airborne enemies

NED

Well-known member
Is there a way to make a specific attackbox of an anim, hitting only airborne enemies and avoiding standing enemies.

as a reference, this is for an air slam atempt.
the move still give attempt hit reaction to stand enemies.  :-\
35uo.jpg


*changed the title to match the "effect" I need
 
Yes, but it's too advanced for you at the moment, and isn't needed for this anyway. It involves using the doattack event event to check for hit status and disable the hit depending on your conditionals.

Back to the purpose, your air throw has no business using hit boxes for the trigger. You should be using range instead. See the example below, it checks for air to air, and then air to ground throws.

Code:
/* Instant throws. */  			
			if(iKLtH || iKRtH)																	//Holding left or right?
			{	
				/* Air to Air throw (Ax Destroyer). */
				vTar	= findtarget(vSelf, A_FOLLOW12, 100);									//Look for target in range of grab.
								
				if(vTar)																		//Valid target?
				{
					iBase	= getentityproperty(vTar, "base");
					fY		= getentityproperty(vTar, "a");
					iH		= fY - iBase;
					iAni	= getentityproperty(vTar, "animationid");

					if(iAni != DEFPOSE 
						&& iH >= 5)																//More then 5 pixels from ground and not being thrown already?
					{	
						/*
						Can be grabbed? Can't use nograb flag as we want to catch falling targets too 
						and OpenBOR applies nograb flag by default. Instead we check for riding on an animal. 
						Otherwise, anything that won't crash (i.e. has thrown poses) is fair game.
						*/
						if(!getentityproperty(vTar, "animal") && getentityproperty(vTar, "animvalid", DEFPOSE))
						{
							bind0014(vTar, 0);													//Initialize bind variable.	
							ani0009(0, A_FOLLOW12, -1);											//Apply animation.
							changeentityproperty(vSelf, "velocity",0,0,0);
							changeplayerproperty(vSelf, "playkeys", 0);							//Clear key event.
						}
					}
				}

				/* Air to ground throw (swing DDT) */
				vTar	= findtarget(vSelf, A_FOLLOW15, 100);									//Look for target in range of grab.
								
				if(vTar)																		//Valid target?
				{
					iBase	= getentityproperty(vTar, "base");
					fY		= getentityproperty(vTar, "a");
					iH		= fY - iBase;
					iDrop   = getentityproperty(vTar, "aiflag", "drop");						//Drop status.
					iAni	= getentityproperty(vTar, "animationid");

					if(iAni != DEFPOSE
						&& iAni != A_RISE
						&& iAni != A_RISEATK
						&& iH < 5 
						&& !iDrop)																//Less then 5 pixels from ground, not falling, not rising, and not being thrown already?
					{	
						/*
						Can be grabbed? Can't use nograb flag as we want to catch falling targets too 
						and OpenBOR applies nograb flag by default. Instead we check for riding on an animal. 
						Otherwise, anything that won't crash (i.e. has thrown poses) is fair game.
						*/
						if(!getentityproperty(vTar, "animal") && getentityproperty(vTar, "animvalid", DEFPOSE))
						{
							bind0014(vTar, 0);													//Initialize bind variable.	
							ani0009(0, A_FOLLOW15, -1);											//Apply animation.
							changeplayerproperty(vSelf, "playkeys", 0);							//Clear key event.
						}
					}
				}
			}

 
Got it! thanks.

I think I start to understand how the script works, but I have some uncertain points:


Since my move is to do only with hold forward:

if(iKLtH || iKRtH)
is changed to
if(iKRtH)

is it right?

A_FOLLOW12 is the air throw itself, right?

do I need to check for animals? I don't use them in this mod.

To use this script I can add it to my regular animation script file and how to ask for the cmd?

"@cmd????"

I feel a little confused about how to adapt and apply the script
 
my grab is almost working with hitbox.
but using this body detection code by DC can be a grea way to avoid weird results.

Does anyone know how to use it?
thanks.
 
I was checking wrong anim in Ralf.

Ok, so I tried to find all component of your air slam system.
I seems  work just like "grabcheckG".
I've put some quotes to explain what I understand.

From Ralf:

Code:
#regular jump attack
anim jumpattack
        delay   10
        followcond 2
        followanim 12
	offset	38 98
        counterattack 1
        hitfx   data/sounds/block.wav
        attack16 18 -7 65 30 0 0 1 1 0 15
        noreflect 1
	frame	data/chars/ralf/jumpK01.gif
        attack  0
        @cmd    anichange "ANI_FOLLOW3"
	frame	data/chars/ralf/jumpK01.gif

#air grab checker
anim follow12
	delay	1
	offset	38 98
	#bbox	14 8 47 45
	frame	data/chars/ralf/jumpK01.gif
        @cmd    grabcheckA "ANI_GRABUP2" "ANI_FOLLOW3" "ANI_FOLLOW3"
	frame	data/chars/ralf/jumpK01.gif

#air kick (also used on air grab miss)
anim follow3
	offset	38 98
	delay	5
	#bbox	14 8 47 45
	frame	data/chars/ralf/jumpK01.gif
	delay	1000
        #bbox    14 20 59 39
	attack4	85 48 40 37 16 1
	frame	data/chars/ralf/jumpK02.gif

#the air slam itself
anim grabup2
	delay	1
        attackone 0
	offset	57 98
        landframe 10
        quakeframe 11 1 7
	frame	data/chars/ralf/NapStr01.gif
        @cmd    entergrab
        @cmd    anti
	frame	data/chars/ralf/NapStr01.gif
	delay	6
        @cmd    slamstart
        @cmd    position 7 27 4 -1 -1
        @cmd    spawn01 "GFlash" 37 63 -1
        sound	data/chars/ralf/head.wav
	frame	data/chars/ralf/NapStr01.gif
        attack4 -1 -6 104 51 10 1 1
        @cmd    antiwall -2 5 -1
        @cmd    position 5 -17 127 -1 -1
	frame	data/chars/ralf/NapStr02.gif
        attack4 -2 -1 57 92 10 1 1
        @cmd    position 6 -40 15 -1 -1
	frame	data/chars/ralf/NapStr03.gif
        attack4 -1 52 94 51 10 1 1
        @cmd    position 2 -4 -5 -1 -1
	frame	data/chars/ralf/NapStr04.gif
        attack4 53 6 50 97 10 1 1
        @cmd    position 7 27 4 -1 -1
	frame	data/chars/ralf/NapStr01.gif
        attack4 -1 -6 104 51 10 1 1
        @cmd    position 5 -17 127 -1 -1
	frame	data/chars/ralf/NapStr02.gif
        attack4 -2 -1 57 92 10 1 1
        @cmd    position 6 -40 15 -1 -1
	frame	data/chars/ralf/NapStr03.gif
	delay	1000
        attack4 -1 52 94 51 10 1 1
        @cmd    position 2 -4 -5 -1 -1
	frame	data/chars/ralf/NapStr04.gif
	offset	47 88
	delay	5
        attack4 40 40 54 52 15 1 1
        @cmd    position 2 -2 -12 -1 -1
	frame	data/chars/ralf/NapStr05.gif
	delay	15
        @cmd    spawner "QFX" 0 0 0
	frame	data/chars/ralf/NapStr05.gif
	delay	15
        attack  0
        @cmd    depost 1
        @cmd    finish 50 2 -2 2.5 0 0
	frame	data/chars/ralf/NapStr06.gif
	delay	7
	offset	51 119
	frame	data/chars/ralf/cslam05.gif
	frame	data/chars/ralf/cslam06.gif
	offset	31 119
	frame	data/chars/ralf/cslam07.gif

-So there is a jump attach that don't attack but go to "follow3" the actual jump attack.

-there is also a checker that detect a close air opponent.
On success, it goes to the slam "grabup2"
On miss it plays "follow3" (air attack)

I just don't understand how do you triggers/activate "follow12" (the checker)??
 
-So there is a jump attach that don't attack but go to "follow3" the actual jump attack.

It does attacks but what it actually does is trying to 'grab' an opponent. Opponent hit by this attack will be slammed/thrown if it suitable for slam/throw.

This attack is played briefly to replicate single jumpattack system used in beat'm ups for air grabs.

-there is also a checker that detect a close air opponent.
On success, it goes to the slam "grabup2"
On miss it plays "follow3" (air attack)

Yep
 
Back
Top Bottom