Solved An alternative animation to the block animation following the type of attack

Question that is answered or resolved.

16-bit Fighter

Active member
I'd like an enemy to play another animation than block anim if he blocks a specific attack (by instance attack6).

In his didblockscript I put this only script but nothing happens like I want since the block anim still starts running instead of follow2 anim:

Code:
void main()
{
    void self=getlocalvar("self");
    if(getlocalvar("attacktype")==openborconstant("ATK_NORMAL6"))
    {
        performattack(self,openborconstant("ANI_FOLLOW2"));
    }
}

Thanks in advance for any help.
 
Solution
Why not use the native functionality?

If you have an appropriate Blockpain#, it plays when blocking attack#. It is NOT a "pain" animation, it's a block reaction, like KOF games. It was put in specifically for needs like this.

DC
attack{#} {x} {y} {right} {down} {damage} {power} {block} {noflash} {pausetime} {z}

That's the legacy attack box style which you need to stop using anyway, but more importantly your suggestion would have the opposite effect. {block} makes the attack unblockable unless the target has a higher defense blockpower property, and by default they don't.

DC
 
That's the legacy attack box style which you need to stop using anyway, but more importantly your suggestion would have the opposite effect. {block} makes the attack unblockable unless the target has a higher defense blockpower property, and by default they don't.

DC
Ahh yes that's a definitely right
 
@16-bit Fighter
When you mean the last OP, which build are you mentioning? If you are using any other official release above 6391, they are in "alpha" state and are not stable.
In case you are mentioning builds compiled directly from the latest source, I tested the blockpain and worked too.

Please, try your engine build in this BOR I used on my tests and let me know if it works. We need to know if the difference is in the engine or in the game.
Thanks for sending your mod, it's the best way to get an answer.
I did use OP 6391. And with your mod it happens the same problem I had. With "nopassiveblock 1" Shermie doesn't block at all and without nopassiveblock she blocks but only with block anim, not with blockpain6 anim. It seems my computer is the source of the issue, I guess. I'll try with another tomorrow.
 
Thanks for sending your mod, it's the best way to get an answer.
I did use OP 6391. And with your mod it happens the same problem I had. With "nopassiveblock 1" Shermie doesn't block at all and without nopassiveblock she blocks but only with block anim, not with blockpain6 anim. It seems my computer is the source of the issue, I guess. I'll try with another tomorrow.
Did you test the mod I sent directly or you just moved my data folder to the root of your exe? This may be due to remaining saves folders, I suggest to erase it.

EDIT: I remade the tests and noticed that in the 6391 for some reason the blockpain doesn't work if nopassiveblock is not declared on the defender, different from the latest source code where it works fine in any situation.

But in both cases with or without the nopassiveblock, the enemy will block anyway. I think we need to discover why the nopassiveblock is not working for you because this function will solve your problem, making the enemy always block attacks and making the blockpain always works.

 
Last edited:
Did you test the mod I sent directly or you just moved my data folder to the root of your exe? This may be due to remaining saves folders, I suggest to erase it.

EDIT: I remade the tests and noticed that in the 6391 for some reason the blockpain doesn't work if nopassiveblock is not declared on the defender, different from the latest source code where it works fine in any situation.

But in both cases with or without the nopassiveblock, the enemy will block anyway. I think we need to discover why the nopassiveblock is not working for you because this function will solve your problem, making the enemy always block attacks and making the blockpain always works.


That may be something you'll have to do with script after all. I seem to recall reworking the nopassiveblock code in upcoming engine build to fix a bug it had.

DC
 
Did you test the mod I sent directly or you just moved my data folder to the root of your exe? This may be due to remaining saves folders, I suggest to erase it.

EDIT: I remade the tests and noticed that in the 6391 for some reason the blockpain doesn't work if nopassiveblock is not declared on the defender, different from the latest source code where it works fine in any situation.

But in both cases with or without the nopassiveblock, the enemy will block anyway. I think we need to discover why the nopassiveblock is not working for you because this function will solve your problem, making the enemy always block attacks and making the blockpain always works.

I made other tests and actually I've just realized how nopassive really works. The player needs to hit without hitting the enemy in order to make him play his block anim and then the player hits the enemy who really blocks and with his blockpain anim. But when one plays normally, the enemy alomost never can block a jab but just long range attack.
Now I wonder why in my mod it doesn't work. I dive into it again tomorrow.

Great thanks for your help!
 
Sorry guys, now that I understand how nopassive block works I saw blockpain actually works in my mod. (y)

The problem to me was that the enemy moves during his block anim and his blockpain anim is short and keeps moving. Moreover I made tests with a lot of same enemies. Thus the intended reactions were lost in the crowd and I didn't notice what exactly happened. I should have made some tests more simple. 😅

I've tried the blockscript above myself and it works as intended. So I'm not sure why it doesn't work in your end @16-bit Fighter .
Though I should mention that in my end, blocking enemy has nopassiveblock 1 set, range set in his BLOCK animation and no BLOCKPAIN animation.
I didn't make test. I wanted to manage with the blockpain way first. Thank you for testing and thank you all for your patience!
 
Back
Top Bottom