Block & Counter

aL BeasTie

Well-known member
Block and Counter by BonusJZ

Here are my little research about counters.

Intro:
First one must be state that anim follow is not independent animation
and is only as replacement of frames in orginal anim .
Some animation (as idle , walk, pain) cannot make any attack and
all attack bboxes are in this animation ignored by engine.
So if you try put counter that supose hit enemy in (egz) block you finish
with character perform his counter but not hit enemy as block cannot
make attack (you block ,couter was trigered and anim follow was playing)

Procedure:
Now a little example:

1. I try to set counter in anim block for fighter in my D&D:

a) counterframe 0 3 0
    followanim 1
    nothing - character was only blocking
b) counterframe 0 1 0
    followanim 1
    character only perform counter when is attack by enemy with blast but his counter (uppercut) was not hurt target
c) counterframe 0 1 0
    followanim 1
    (anim follow make charakter roll back/duck/jumpback desapear) and that is one of solutions

2. I realy want to have counter in block that hits enemys:

a) counterframe 0 1 0
    followanim 1

in anim follow you must make charakter to shot/throw something (shoot/knife is defrent entity and his anim idle is meam to hurt enemys)

b) do everything as in 2a but shot/knife make from empty.gif and now you can have character performing uppercut/hard blow and so on (shoot be hitting enemy but be looks like as character)

3.If you set counter in any anim that by default hurt enemys/players
  as attack1/2/3 special1/2 (and so on) anim follow be hitting enemys  without problems as long as condition are meat

counterframe: The first argument is the number of the frame in which the counterattack is available. The user must be hit in this frame in order to counter.

second argument: The conditions under which the counter will be used:
1: The counter will always be used.
2: The counter will be used as long as the attacker was an enemy (Or a player if an enemy uses it).
3: The counter will be used as long as the attacker was an enemy, the attack was not unblockable, hits the user from the front, and was not a FREEZE attack.

thrid argument: This is a flag which controls damage.
0: The entity which performs the counterattack will not take any damage from the attack.
1: The entity which performs the counterattack will take damage, even if the counterattack is successful.

followanim 1 this is the follow animation to use if the counter conditions are met. This one goes to FOLLOW1.


Enjoy.

by BonusJZ
 
I have been trying this also, I'm hoping to do this:
when player press block at about the same time the enemy attacks, he/she counters the attack (fights back).

I used counterframe/counterrange in block animation, with follow1 as counterattack animation. The problem is that once the character is blocking, it seems like it is not considered "being hit" when receiving attacks.
So the counter action (follow1) is not triggered when the character is being hit (fully blocked, not damage). The funny thing I noticed is that the character will counter attack when being attack from the back while holding block...lol

I don't quite get the situation in this post. Whenever the counter attack (follow1) is triggered for my character, it does make damage when hits enemy facing front (while the counter has to be triggered by another enemy hitting from the back).

I have not seen many people using this in the game? Is there a way to make it work correctly?
 
doranikofu said:
I have been trying this also, I'm hoping to do this:
when player press block at about the same time the enemy attacks, he/she counters the attack (fights back).

There are two ways to do this. My preferred method is to use the doattack script events. These fire when a collision is detected but before the engine takes any associated actions (pain stun, damage, etc.). You can then check for certain conditions (like timing of block press) and take your own actions accordingly. This is how I made my parry system - and it's why I codded in the doattack event to begin with. Takes more work to set up, but gives you absolute total versatility and control.

The second is to use counterrange, but without blocking. Pierwolf's endless quest module demonstrates this. The counterattack just simulates a block. It's effective, but the downside is you can't use it in conjunction with a regular block system without some scripting - in which case you should be using doattack event anyway.

So the counter action (follow1) is not triggered when the character is being hit (fully blocked, not damage). The funny thing I noticed is that the character will counter attack when being attack from the back while holding block...lol

That's because by default you cannot block attacks from behind. You CAN counter attacks from behind though, so...

DC
 
thanks DC
I will look into those.
Yeah I did notice block not working from back, but it is just somewhat funny to see character counteract to hit someone in front when receiving attack from the back...
 
Just FYI, there is a model setting called blockback that will enable that model to block from behind.

DC
 
Back
Top Bottom