Reaction (attack1 -> pain, attack2 > pain2)

Hi,

I've spent a couple of days looking into how OpenBOR works:

spright - 0037.png

I have to say I'm pretty impressed with the engine thus far!

One thing I can't seem to get working right is how reactions work.

Yuri has 2 pain animations:

pain - gets hit high
pain2 - gets hit low

So reading the docs, I understand that she should use 'pain' when hit by an enemy's attack1 and 'pain2' when hit by their attack2?
Does the same apply for freespecials? (e.g. freespecial1 triggers 'pain', freespecial2 triggers 'pain2'?

Because this won't work for me, she always uses the default pain animation.

What am I doing wrong?

Thanks in advance!
 
attack 311 310 308 54 30 1 0 0 20 70 will send enemy to pain , fall , death

attack2 311 310 308 54 30 1 0 0 20 70 will send him to pain2 , when hes hit in air it sends him to fall2 , death2 when he dies from this attack

and so on with attack3 ,attack4 etc ....

make sure maxattacks are changed in models.txt but i think attack2 should work from get go.
Also always post your text file contents if you really want quick solution, otherwise ppl will keep guessing what is the cause.

maxattacks 10
maxfollows 40
maxfreespecials 20


Also dont confuse animation name with this funcitonality, cause you can even have attack5 311 310 308 54 30 1 0 0 20 70 in your attack2 animation or in rise animation. The only thing that matters is the attack number in the hitbox - attack5 311 310 308 54 30 1 0 0 20 70
 
Ahh okay, I was confusing the animation name with the atttack box. Gotcha.
That's the old syntax, right? My editor (CMT) converts it to the new multi-line one automatically.

So would this work?

attack2.position.x 45
attack2.position.y 35
attack2.size.x 60
attack2.size.y 26
...

for pain2?
 
Welcome to the forum, Ralf.

So reading the docs, I understand that she should use 'pain' when hit by an enemy's attack1 and 'pain2' when hit by their attack2?
Does the same apply for freespecials? (e.g. freespecial1 triggers 'pain', freespecial2 triggers 'pain2'?
You seem to be very confused with the pain reactions due to attack names with animation names, isn't it? Take a look at this example with highlights to examine how the attackboxes (attack inside anim attack) create reactions for target's pain animations.

Example:
anim attack #Low punch
delay 2
offset 24 99
bbox 5 0 56 101
@cmd makeOpponentBlock
@cmd attack1 0 58 0 "ANI_ATTACK4" #attack1 {minx} {maxx} {z} {animation}
sound data/sounds/common/punch.wav
frame data/chars/ryu/161.gif
attack 50 6 46 20 7 0 0 0 23 0 0
bbox 5 0 63 101
@cmd makeOpponentBlock
frame data/chars/ryu/162.gif
@cmd makeOpponentBlock
frame data/chars/ryu/163.gif
attack1 0 0 0 0 0 0 0 0 0 0 0
bbox 5 0 56 101
@cmd makeOpponentUnblock
frame data/chars/ryu/164.gif
offset 25 99
frame data/chars/ryu/165.gif

The one in green doesn't come from animation name itself. It's a normal attack for the target to react with a normal pain animation. As a result, this causes the target to react with anim pain.
anim pain #LP pain normal
delay 4 #Pain from both close and far ranges of light punch
offset 25 99
bbox 8 1 32 101
platform 4 99 0 0 46 46 1 55
frame data/chars/ryu/0500000000.gif # 0
@cmd velo001 -2 0 0
delay 7
platform 4 99 0 0 46 46 1 55
frame data/chars/ryu/0500000000.gif # 1
offset 35 100
delay 5
platform 12 100 0 0 46 46 1 55
frame data/chars/ryu/0500000010.gif # 2
offset 25 99
@cmd velo001 0 0 0
platform 4 99 0 0 46 46 1 55
frame data/chars/ryu/0500000000.gif # 3
@cmd beidle
frame data/chars/ryu/0500000000.gif # 4
#Crouch pain activated via onpainscript and ondoattackscript
offset 26 67
bbox 8 1 32 69
frame data/CHARS/Ryu/0502000000.gif #5
offset 38 68
frame data/CHARS/Ryu/0502000010.gif #6
frame data/CHARS/Ryu/0502000010.gif #7
frame data/CHARS/Ryu/0502000010.gif
@cmd keyint2 "ANI_DUCK" 2 "D" 0 #Stay ducking?
@cmd keyint2 "ANI_FOLLOW6" 0 "D" 1 #Get up?
#frame data/CHARS/Ryu/0502000030.gif
offset 26 67
frame data/CHARS/Ryu/0502000000.gif #5

For pain2, same principle. The attacker does a similar attack, but this time, he has a different attack type for the target to react its pain differently.
anim freespecial #Middle punch
delay 6
bbox 22 1 43 98
offset 23 99
@cmd makeOpponentBlock
@cmd keyint2 "ANI_ATTACK2" 0 "F" 0
@cmd attack1 0 66 0 "ANI_ATTACK5"
sound data/sounds/common/punch1.wav
hitfx data/sounds/common/beat2.wav
frame data/chars/ryu/171.gif
attack2 49 10 50 23 8 0 0 0 0 0
@cmd makeOpponentBlock
offset 21 99
frame data/chars/ryu/172.gif
offset 20 99
@cmd makeOpponentBlock
frame data/chars/ryu/173.gif
offset 21 99
attack2 0 0 0 0 0 0 0 0 0 0
@cmd makeOpponentUnblock
frame data/chars/ryu/174.gif
offset 22 99
frame data/chars/ryu/175.gif
bbox 13 1 43 98
offset 24 99
frame data/chars/ryu/176.gif
bbox 9 1 43 98
offset 25 99
frame data/chars/ryu/177.gif

Here, this target starts his anim pain2.
anim pain2 #MP pain normal
offset 35 100
delay 5
bbox 8 1 32 101
frame data/chars/ryu/0500000010.gif #0
@cmd velo001 -2 0 0
delay 7
frame data/chars/ryu/0500000010.gif #1
offset 43 97
delay 11
bbox 4 1 35 101
frame data/chars/ryu/0500000020.gif #2
offset 35 100
delay 3
bbox 8 1 32 101
@cmd velo001 0 0 0
frame data/chars/ryu/0500000010.gif #3
@cmd beidle
frame data/chars/ryu/0500000010.gif #4
delay 5
offset 38 68
bbox 8 1 32 71
frame data/CHARS/Ryu/0502000010.gif
delay 7
@cmd velo001 -2 0 0
frame data/CHARS/Ryu/0502000010.gif
offset 45 67
delay 11
frame data/CHARS/Ryu/0502000020.gif
offset 38 68
@cmd velo001 0 0 0
delay 3
frame data/CHARS/Ryu/0502000010.gif
@cmd keyint2 "ANI_DUCK" 2 "D" 0 #Stay ducking?
@cmd keyint2 "ANI_FOLLOW6" 0 "D" 1 #Get up?
frame data/CHARS/Ryu/0502000010.gif

For a better understanding, take a look here.

 
Last edited:
Ok, got it.

The problem is that CMT converts the syntax automatically so I can't use a single line like attack2 49 10 50 23 8 0 0 0 0 0.
This is what I got:


# ---- straight jab, should trigger 'pain'
anim attack1
delay 1
offset 20 94
frame data/chars/yuri/kof2002/pa1.gif
frame data/chars/yuri/kof2002/pa2.gif
offset 20 95
delay 3

attack.damage.force 3
attack.effect.hit.flash.disable 1
attack.position.x 45
attack.position.y 15
attack.reaction.pause.time 10
attack.size.x 41
attack.size.y 14


frame data/chars/yuri/kof2002/pa3.gif
frame data/chars/yuri/kof2002/pa4.gif
attack 0
frame data/chars/yuri/kof2002/pa5.gif
frame data/chars/yuri/kof2002/pa6.gif
frame data/chars/yuri/kof2002/pa7.gif

# ----- low kick, should trigger 'pain2'
anim attack2
delay 3
offset 20 90
frame data/chars/yuri/kof2002/pb1.gif
offset 20 83
frame data/chars/yuri/kof2002/pb2.gif
offset 20 87
delay 6

attack.damage.force 6
attack.effect.hit.flash.disable 1
attack.position.x 66
attack.position.y 10
attack.reaction.pause.time 10
attack.size.x 43
attack.size.y 9


frame data/chars/yuri/kof2002/pb3.gif
offset 19 85
attack 0
frame data/chars/yuri/kof2002/pb4.gif
offset 8 91
frame data/chars/yuri/kof2002/pb5.gif
offset 12 95
frame data/chars/yuri/kof2002/pb6.gif
offset 17 93
frame data/chars/yuri/kof2002/pb7.gif

I've tried doing it like this:

attack2.damage.force 6
attack2.effect.hit.flash.disable 1
attack2.position.x 66
attack2.position.y 10
attack2.reaction.pause.time 10
attack2.size.x 43
attack2.size.y 9


... but that breaks the hitbox altogether?
 
Hello
I have a question.
Can I use the same reaction more than once?
Thank you.

anim attack1
loop 0
delay 8
bbox 58 71 18 58
offset 64 131
frame data/chars/6dragon/a101.gif
delay 14
attack2 76 77 23 18 8
frame data/chars/6dragon/a102.gif
delay 8
attack2 0 0 0 0 0
frame data/chars/6dragon/a103.gif



anim attack2
loop 0
bbox 58 71 18 58
offset 64 131
delay 4
move 3
frame data/chars/6dragon/a201.gif
frame data/chars/6dragon/a201.gif
delay 2
attack3 72 69 22 35 10
frame data/chars/6dragon/a202.gif
frame data/chars/6dragon/a202.gif
frame data/chars/6dragon/a202.gif
attack3 0 0 0 0 0
move 0


anim attack3
loop 0
bbox 58 71 18 58
offset 64 131
delay 8
frame data/chars/6dragon/a301.gif
delay 14
attack3 76 77 23 18 10
frame data/chars/6dragon/a302.gif
attack3 0 0 0 0 0
delay 8
frame data/chars/6dragon/a301.gif



anim attack4
loop 0
delay 8
bbox 58 71 18 58
offset 64 131
frame data/chars/6dragon/a303.gif
delay 14
attack 76 77 23 18 10 1
frame data/chars/6dragon/a304.gif
delay 8
attack 0 0 0 0 0
frame data/chars/6dragon/a305.gif
 
Hello
I have a question.
Can I use the same reaction more than once?
Thank you.

anim attack1
loop 0
delay 8
bbox 58 71 18 58
offset 64 131
frame data/chars/6dragon/a101.gif
delay 14
attack2 76 77 23 18 8
frame data/chars/6dragon/a102.gif
delay 8
attack2 0 0 0 0 0
frame data/chars/6dragon/a103.gif



anim attack2
loop 0
bbox 58 71 18 58
offset 64 131
delay 4
move 3
frame data/chars/6dragon/a201.gif
frame data/chars/6dragon/a201.gif
delay 2
attack3 72 69 22 35 10
frame data/chars/6dragon/a202.gif
frame data/chars/6dragon/a202.gif
frame data/chars/6dragon/a202.gif
attack3 0 0 0 0 0
move 0


anim attack3
loop 0
bbox 58 71 18 58
offset 64 131
delay 8
frame data/chars/6dragon/a301.gif
delay 14
attack3 76 77 23 18 10
frame data/chars/6dragon/a302.gif
attack3 0 0 0 0 0
delay 8
frame data/chars/6dragon/a301.gif



anim attack4
loop 0
delay 8
bbox 58 71 18 58
offset 64 131
frame data/chars/6dragon/a303.gif
delay 14
attack 76 77 23 18 10 1
frame data/chars/6dragon/a304.gif
delay 8
attack 0 0 0 0 0
frame data/chars/6dragon/a305.gif

Yes. There's no logical reason why you can't.

DC
 
Back
Top Bottom