Character won't use fall5

Hi,

So I have a bunch of characters featuring these animations:

attack1 (jab) #attack.damage.type=0
attack2 (straight) #attack.damage.type=1
attack3 (body blow) #attack.damage.type=2
attack4 (upper) #attack.damage.type=3 (always knocks down)
freespecial1 (legsweep) #attack.damage.type=4 (always knocks down)
pain1 (hit by jab)
pain2 (hit by straight)
pain3 (hit by body blow)
fall1 (fall by jab)
fall2 (fall by straight)
fall3 (fall by body blow)
fall4 (fall by uppercut)
fall5 (fall by leg sweep)

Each attack box has the property attack.damage.type set to the appropriate value, so attack1 triggers pain1/fall1, attack2 pain2/fall2 etc.
This works fine for fall1-4, but not for fall5.

So in other words, this attack box:


attack.damage.force 10
attack.damage.type 4
attack.effect.hit.flash.disable 1
attack.position.x 40
attack.position.y 22
attack.reaction.fall.force 1
attack.reaction.fall.velocity.x 0.0
attack.reaction.fall.velocity.y 4.0
attack.size.x 67
attack.size.y 15


.. should trigger the victim's fall5 animation, but instead uses the 'fall1' one.

I have this in models.txt:

maxfollows 10
maxattacks 10
maxattacktypes 10
maxfreespecials 10

So I don't know why it uses the correct pain/fall animations for 1-4, but not for 5.
 
Have you tried using attack.damage.type 5?

attack.damage.force 10
attack.damage.type 5
attack.effect.hit.flash.disable 1
attack.position.x 40
attack.position.y 22
attack.reaction.fall.force 1
attack.reaction.fall.velocity.x 0.0
attack.reaction.fall.velocity.y 4.0
attack.size.x 67
attack.size.y 15
 
Last edited:
That would trigger 'fall6'.

Anyway, I tried just now calling the fall-by-sweep animations 'fall6', and that doesn't work either.

It seems like there's an imposed limit of 4 fall types, despite maxattacktypes being set to 10.
 
Last edited:
You're finding the nearest neighbour

You should not have pain1 it should just be


anim pain = attacktype 1
anim pain2 = attacktype 2
anim pain3 = attacktype 3

And so on.

Anim fall
Anim fall2
Anim fall3

Attack
Attack2
Attack3


As a general rule (I'm not sure if it's changed) I start with freespecial5 as being my first input freespecial
the first few freespecials are set as defaults

  • FREESPECIAL defaults to F, F, A if you can’t run and B, F, A if you can. FREESPECIAL2 defaults to D, D, A. FREESPECIAL3 defaults to U, U, A. The other FREESPECIALs don’t default to anything, and thus need to be defined to be useable by command.
  • For enemies, this animation works just like normal attack animations.
so I don't have freespecial and 2 and 3 and 4, I start with freespecial5 but thats just me, only reason I do this is because I had some conflicts with inputs but its not something you HAVE to do.
 
Last edited:
Which version are you using? This seams to be a bug
Yeah, I did a quick test and there's something strange. For some reason attack.damage.type 10 is triggering fall6 and attack.damage.type 7 is triggering anim shock.
However, the legacy attack box works fine, I will check the source.


 
Yeah, I did a quick test and there's something strange. For some reason attack.damage.type 10 is triggering fall6 and attack.damage.type 7 is triggering anim shock.
However, the legacy attack box works fine, I will check the source.



Yikes, if that's the case I need to fix it ASAP. Let me know what you find.

For that matter, attack type should not be 0 indexed. 1 should be pain, 2 = pain2, and so on.

DC
 
Yikes, if that's the case I need to fix it ASAP. Let me know what you find.

For that matter, attack type should not be 0 indexed. 1 should be pain, 2 = pain2, and so on.

DC
I'm still looking for a issue in the source, but certainly there's something wrong with the new collision system. It looks like a issue with the attack type translation, as we can see in the video the legacy works as intended.


Here's the animations used in the video, tested with/without the damage in the second test to see if it changes something, but had the same result:
C:
anim attack1 #FIRST TEST
    fastattack 1
    jugglecost 4
    forcedirection -1
    otg 1
    loop    0
    delay    8
    offset    62 125
    bbox    50 55 23 74
    @cmd hitfx "data/sounds/sor3_hit.wav"
    @cmd sound "data/sounds/sor3_attack.wav"
    frame    data/chars/heroes/axel/sor3/a100.png
    attack 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    attack1 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    attack2 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    attack3 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    attack4 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    attack5 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    attack6 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    attack7 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    attack8 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    attack9 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    attack10 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    burn 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png
    attack 0 0 0 0 0 0 0 0 0 0
    frame    data/chars/heroes/axel/sor3/a100.png
    shock 62 61 42 13 2 0 0 0 5 12
    frame    data/chars/heroes/axel/sor3/a101.png


anim attack1 #SECOND TEST
    fastattack 1
    jugglecost 4
    forcedirection -1
    otg 1
    loop    0
    delay    8
    offset    62 125
    bbox    50 55 23 74
    @cmd hitfx "data/sounds/sor3_hit.wav"
    @cmd sound "data/sounds/sor3_attack.wav"
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #ATK
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type 1
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #ATK2
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type 2
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #ATK3
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type 3
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #ATK4
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type 4
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #NULL
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type 5
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #BURN
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type 6
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #NULL
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type 7
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #SHOCK
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type 8
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #NULL
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type 9
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #ATK5
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type 10
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #ATK6
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type burn
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #BURN
    attack none
    frame    data/chars/heroes/axel/sor3/a100.png
    attack.damage.type shock
    attack.position.x 62
    attack.position.y 61
    attack.size.x 42
    attack.size.y 13
    attack.damage.force 2
    attack.reaction.fall.force 0
    frame    data/chars/heroes/axel/sor3/a101.png #SHOCK
 
One more discovery, looks like the sequence is the same as coded in e_attack_types enumeration, but only happens if you use the new method.


C:
typedef enum
{
    ATK_NONE            = -1,   // When we want no attack at all, such as damage_on_landing's default.
    ATK_NORMAL,
    ATK_NORMAL1            = ATK_NORMAL,
    ATK_NORMAL2,
    ATK_NORMAL3,
    ATK_NORMAL4,
    ATK_BLAST,
    ATK_BURN,
    ATK_FREEZE,
    ATK_SHOCK,
    ATK_STEAL,
    ATK_NORMAL5,
    ATK_NORMAL6,
    ATK_NORMAL7,
    ATK_NORMAL8,
    ATK_NORMAL9,
    ATK_NORMAL10,

    // For engine and script use. These are
    // applied automatically by various
    // conditions or intended for script logic.
    ATK_BOSS_DEATH,                    // KO leftover enemies when boss is defeated.
    ATK_ITEM,                        // Scripting item logic. Item "attacks" entity that collects it.
    ATK_LAND,                        // Touching ground during a damage on landing fall.
    ATK_LIFESPAN,                    // Entity's lifespan timer expires.
    ATK_LOSE,                        // Players (with lose animation) when level time expires.
    ATK_PIT,                        // Entity falls into a pit and reaches specified depth.
    ATK_SUB_ENTITY_PARENT_KILL,        // Used to KO a summon when parent is killed.
    ATK_SUB_ENTITY_UNSUMMON,        // Used to KO a summon on unsummon frame.
    ATK_TIMEOVER,                    // Players (without lose animation) when level time expires.
    
    // Default max attack types (must
    // be below all attack types in enum
    // to get correct value)
    MAX_ATKS,
    STA_ATKS       = (MAX_ATKS-1)
} e_attack_types;
 
Back
Top Bottom