Report: riseattacktype 3 is not working.

hechelion

Member
Hi.
I think I found another bug.

according to the documentation
riseattacktype {int}

    ~Determines how entity performs RISEATTACK while rising.
        0 = Only RISEATTACK will be used. Other RISEATTACK animations (see Animation Types below) won't be used.
        1 = RISEATTACK will be played based on received attacktype. For instance, if entity was knocked down with attack5, entity will perform RISEATTACK5 if it's executed. If required animations aren't available, RISEATTACK will be played instead.
        3 = Like 1 but if required animations aren't available, RISE will be played instead (no riseattack).

I create an enemy with the animations rise, riseattack, riseattack1 and a character with riseattacktype = 3, attack1 and attack4

If I take down the enemy with attack4, he executes a riseattack instead of a rise.



Looking at the source code I did not find any reference to riseattacktype == 3, a possible solution (At least for my game it works) is to add the following condition to the function "int set_riseattack(entity *iRiseattack, int type, int reset)" in openbor.c

Code:
    if( (!validanim(iRiseattack, animriseattacks[type]) ||
        (iRiseattack->inbackpain && !validanim(iRiseattack, animbackriseattacks[type]) && !validanim(iRiseattack, animriseattacks[type]))) &&
       iRiseattack->modeldata.riseattacktype == 3 )
    {
        return 0;
    }
 
If you are anywhere at all close to an enemy that has any type of riseattack, they will use it instead of rise. That is intended behavior.

DC
 
Thanks for the clarification Damon Caskey, but in that case the documentation should be modified.
Because it implies that when using the riseattacktype 3 you can force the "rise" animation over the "riseattack" in certain cases.
Which is precisely what I wanted.
 
But why you want to force rise instead of riseattack? The enemy will try to use the riseattack if its in range.

Have you tried to remove the riseattack animation and leave it with only the extra riseattacks, like riseattack4?

By the way, riseattack and riseattack1 are the same thing, afaik.
 
O Ilusionista said:
Have you tried to remove the riseattack animation and leave it with only the extra riseattacks, like riseattack4?
I have tried this feature a few weeks ago and I think this is the right solution
 
@O Ilusionista
Because forcing the rise only in some movements, but not in all, allows you to create more complex AI patterns.

I think that could work, the problem is the documentation that tells you that this is achieved with riseattacktype 3

@machok, for me, the most correct solution is the one that matches the documentation.
 
Because forcing the rise only in some movements but not in all allows you to create more complex AI patterns.
I think that could work, the problem is the documentation that tells you that this is achieved with riseattacktype 3

I think you got it wrong.

First, "riseattack" and "riseattack1" are the same thing, kinda like "attack" and "attack1" are, "fall" and "fall1", and so on. There is no such thing like "attack0" so the first attack (and the first riseattack) is 1- and you can omit the number.

now see what the manual says:
3 = Like 1 but if required animations aren't available, RISE will be played instead (no riseattack).

And compare to what you made:
I create an enemy with the animations rise, riseattack, riseattack1 and a character with riseattacktype = 3, attack1 and attack4.
If I take down the enemy with attack4, he executes a riseattack instead of a rise.

For sure he will do it - because they have riseattack (in other words, the animation is available). Since the animation is available, the entity will use it.
It would only force to use "rise" IF the animation is not available.
 
Edit:
@O ilusionista you are misunderstanding.

The documentation say:
3 = Like 1 but if required animations aren't available, RISE will be played instead (no riseattack)

If I take down the enemy with attack4, but the enemy dont have riseattack4  (4, not 1), then the enemy have to used RISE instead riseattack. (the documentatition say this very clear).

The problem?
If you check the source code you will see that there is no implementation for a riseattacktype 3, and Damon Caskey makes it clear, I do not know what other interpretation you are trying to give, but  the problem is simple, the documentation talks about a feature that is not currently implemented in Openbor .


 
Back
Top Bottom