Attack reaction

vision

Member
I know it's possible, but forgot how. What I'm trying to accomplish is a specific reaction to an attack. I believe its like this
[attack1 creates pain1. attack2 creates pain2] and so on. but what if its a series of diffrent attacks in one attack.
I want to stop the enemy from walking away while I'm in the middle of an attack chain combo. thats all...... for now
 
You can put "fastattack  1" in the animation header to let the engine know that you want the animation to do multiple hits and then do this:

Code:
        drawmethod  200 255 0 0 0 0 -1
        quakeframe 12 4 5
        @cmd	dasher 1.2 0 0
	hitfx	data/sounds/sf2h.wav
	hitflash	qflash
	delay  	6
	offset	32 81
	frame	data/chars/Feilong/sp900.gif
	@cmd	spawn01 "dust" 0 0 1
	offset	40 90
	sound   data/sounds/sw.wav
	frame	data/chars/Feilong/sp901.gif
	offset	40 83
	Attack	77 6 53 16 10 0 0 0 20    <---tells to play default "pain" because of default "attack"
	sound	data/chars/Feilong/feithrow.wav
	frame	data/chars/Feilong/sp902.gif
	offset	40 83
	frame	data/chars/Feilong/sp903.gif
	offset	40 90
	Attack	0
	frame	data/chars/Feilong/sp904.gif
	offset	40 83
	sound   data/sounds/sw2.wav
	frame	data/chars/Feilong/sp905.gif
	@cmd	spawn01 "dust" 0 0 1
	offset	40 78
	Attack2	52 13 51 20 12 0 0 0 20      <---tells to play "pain2" because of "Attack2"
	sound	data/chars/Feilong/feithrow.wav
	frame	data/chars/Feilong/sp906.gif
	offset	40 78
	frame	data/chars/Feilong/sp907.gif
	offset	40 82
	Attack	0
	frame	data/chars/Feilong/sp908.gif
	offset	40 86
	frame	data/chars/Feilong/sp909.gif
	offset	40 83
	sound   data/sounds/sw3.wav
	frame	data/chars/Feilong/sp910.gif
	@cmd	spawn01 "dust" 0 0 1
	hitfx	data/sounds/fblow.wav
	offset	40 80
	Attack	75 4 61 28 14 1 0 0 60
	sound	data/chars/Feilong/ata3.wav
	frame	data/chars/Feilong/sp911.gif
	@cmd	stop
	offset	40 80
	frame	data/chars/Feilong/sp912.gif
	offset	40 86
	Attack	0
	frame	data/chars/Feilong/sp913.gif

An example of how to get "fastattack" to work is this:

Code:
anim freespecial
        drawmethod  200 255 0 0 0 0 -1
        hitfx	data/sounds/beat100.wav
        hitflash	qflash2
        fastattack        1
        quakeframe 8 3 8
	loop	0
	delay	4
	offset	89 175
	bbox	57 82 50 90
	jumpframe  6 3 2
	landframe  17
	sound   data/chars/ken/Shoryu.wav
	frame	data/chars/ken/shoryu1.png
	frame	data/chars/ken/shoryu2.png
	frame	data/chars/ken/shoryu3.png
        attack  105 130 30 30 5 0 0 0 10
	frame	data/chars/ken/shoryu4.png  <---the attack frame is repeated for delay purposes
	attack  0 0 0 0 0 0
	frame	data/chars/ken/shoryu4.png   <---like this
	attack  113 106 40 31 10 0 0 0 10
	sound   data/sounds/ss2.wav
	frame	data/chars/ken/shoryu5.png
	attack  0 0 0 0 0 0
	frame	data/chars/ken/shoryu5.png
	attack  84 17 40 100 20 1 0 0 20
	frame	data/chars/ken/shoryu6.png
	attack  0 0 0 0 0 0
        delay   7
        frame	data/chars/ken/shoryu6.png
	frame	data/chars/ken/shoryu7.png
	frame	data/chars/ken/shoryu8.png
	frame	data/chars/ken/shoryu9.png
	frame	data/chars/ken/shoryu10.png
	frame	data/chars/ken/shoryu11.png
	frame	data/chars/ken/shoryu12.png
	delay   8
	frame	data/chars/ken/shoryu13.png
	frame	data/chars/ken/shoryu14.png
 
vision, do your enemies have long enough PAIN animation? if it's too short, that might be the cause of them walking away in middle of combo.

Another thing to consider is delay interval between each attack in chain. You have to make sure the interval is less than enemy's PAIN time to ensure enemy won't walk away or retaliate
 
Bloodbane said:
vision, do your enemies have long enough PAIN animation? if it's too short, that might be the cause of them walking away in middle of combo.

Yea Bloodbane, the pain animation is too short

also I want to control the direction that the character moves when being hit like up, back, toward the player, or simply slide back with aggression but not fall.
 
You can use dropv command for that, or use velocity script in pain anims.

Here's a topic about it with solutions -
http://www.chronocrash.com/forum/index.php?topic=719.msg5946#msg5946

EDIT:
I always add these things to Helpful Links section so it's good to check there too when you need something.
http://www.chronocrash.com/forum/index.php?topic=13.msg57#msg57
 
vision said:
Bloodbane said:
vision, do your enemies have long enough PAIN animation? if it's too short, that might be the cause of them walking away in middle of combo.

Yea Bloodbane, the pain animation is too short

also I want to control the direction that the character moves when being hit like up, back, toward the player, or simply slide back with aggression but not fall.

You can use "hitback" to make enemies slide back when hit. Ken, Ryu, and Sean have it on their hurricane kicks and Chun Li has it on her Spinning Bird Kick. I also used it for Ken's Hurricane Barrage Special. You can use "dropv" in many ways such as knocking an enemy forward, backward, upward, straight to the ground, toward the screen or away from the screen. Toward and Awsy from the screen jus need the added "z" value. Volcanic used it in Feilong's "Grabattack2" in Rocket Viper 2.
 
I experimented with "hitback" and it's quite handy but isn't that "attack" specific.
i'm looking to create different reactions with one attack. using the first example shown here is good. but i need more explanation on the parameters of dropv, which  have also used. I will look into the manual before i ask too many questions.
 
This is "hitback"

Code:
void hitBack(char ani,int startframe,int endframe,float spd)
{
	eParm(spd);
	hitEffect(ani,"hitback",startframe,endframe);
}

The order is ANIMATION, STARTFRAME, ENDFRAME, and HOW FAR LEFT OR RIGHT YOU WANT THE ATTACKED ENTITY TO GO. Negative numbers for Left and positive numbers for right. The code attached to it is an EFFECTS code. It almost works the same way but, as you can see, there is "hitback" there to. That "hitback" is the FX that you want to use. You can call this script "hitback.c"

You can put this hitback script in a "didhitscript." Let's say...you name your didhitscript "ken.c" and the path would be, if you organised your scripts, "data/scripts/didhit/ken.c" NOW, specifying "hitback.c" inKens didhitscript would look like this:

Code:
#include "data/scripts/didhit/hitback.c"
#include "data/scripts/common/spawn.c"  <---this is for the "burn" effect only. It has a bind script in it that makes the flame stay on burned enemy then go out
void main()
{
	hitBack("ANI_ATTACK2",0,99,2); <---this is "hitback"
	hitEffect("ANI_SPECIAL","burn",0,99); <---this is for the effect code above
}

 
dropv only works if enemy is knocked down or dies but hitback works regardless. It's a pain animation and u specify it by animation of choice as shown above
 
Back
Top Bottom