Adding Guarding

Was wondering how to enable the defense/guarding animation to a character, I checked in the manual but only could find suggestions for values within the code, any help would be great.

I'm specifically trying to assign the "a" button to guard (while holding the button down)

-.A.S.P
 
you mean blocking with a playable character? there are several commands involved so refer to the lagacy manual when in doubt, in order to enable player blocking ability , you need to put ajspecial 1 in models.txt header, blocking will use the special attack button making the special useles so copy your special attack in to a new freespecial and assing a new imput for it,  then added anim block to your character and you should be ready i think, in addition on character´s header you can use this, holdblock  2 for holding down the buton, blockpain 1 to enable anim blockpain when you get hit wile blocking, bflash then name of a flash entity that will play when your hit wile blocking
 
When you add "ajspecial 1", the SPECIAL button turns into BLOCK, so you can block by just pressing that button.
~Determines the input for special attacks and whether or not players can block attacks.
0 = players use their special with the special key they have assigned and they cannot block.
1 = players can use the input for ATTACKBOTH as a special attack. They can also use a block animation, which will be used when the special attack button is pressed.
~If you set 1 but the player does not have a block animation, they can use their special with both the special key and ATTACKBOTH.

So when you press the SPECIAL button, you will be executing the BLOCK animation. To include a breakout move (kinda like in Final Fight), you need to add an animation called ATTACKBOTH, which will be executed when you press ATTACK and JUMP at the same time.

There are good points and bad points of doing this:

PRO
- If you need to make the player to be able to continue blocking while you hold the button, you just need to add "holdblock 1" and its done.
holdblock {bi}

~Determines whether holding special button will make player play his/her block animation once or continusly.
0 = (default) Once. Press once then block will end normally.
1 = Contiusly. Holding special button makes player block continusly until button is released.
~Use this command with block ability of course.

CONS
- Attack and jump, on devices without physical keyboard, is a PITA.

Personally speaking, I don't like this too much and choose another route - where the SPECIAL is a SPECIAL and the block is executed by pressing A2.
You need to use a simple script to turn on the block (contrary to Mugen, in OpenBOR almost any animation can turn into a block animation - you just can't block and attack at the same time). But you will need a little bigger script to be able to hold the button to keep guarding.
 
Back
Top Bottom