• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

Pain for obstacles + facing

I already have fastattack and i use it often, and i still remember asking for this feature...
Ignoring attack id is not something id want to do, id rather look for some other way to deal with pain in non enemy entity than fix this on the other side. and frankenstein player attack with flags

Maybe there are some other ways to give obstacles pain anims, some entity type juggling.
Found some suggestions here :[solved] pain in obstacles
OK so i think, ill change it back and change it to npc, then i will just cancel attacking particular NPCs by name in player didhitscript and that is cleaner imo.
 
Last edited:
Ignoring attack id is not something id want to do, id rather look for some other way to deal with pain in non enemy entity than fix this on the other side.
But what I am trying to explain is that this issue has nothing related with the script. If you are having this issue with an attack, it will have the same issue against any target.
I say this because I had this issue before and it was not related to the obstacles.
 
good, can you let me not interfere with attacks in players? Theres many ways to do the same meal.
I dont like that i have to put in so much in obstacles pain and do takedamagescript and on top of that change id flags in player attacks , all this could be solved if i knew a way to exclude enemy from group.
From what i remember V4 allows that.
 
IS ther a way to fix this way of giving obstacles pain? the dealbreaker for me is that sometimes pain does not trigger if the attack is too fast from combo and it looks strange.
Previously i had obstacle changing type to enemy to give it pain and backpain, but this also made him count into the group, is there a way to exclude entity from current group ? This would fix this and id prefere to go back to previous method .

So i gues my question is - how to exclude enemy from group so hes not reqwuired to be killed to move on.
Agree with Ilu on this point, in this case it's caused by the attacks. For example, if you have very fast hits, the opponent will most times play the first frame of the pain animation, giving an impression of not triggering pain properly at each hit.

Additionally to the methods Ilu mentioned, you can manage it by changing the hit-pause and delays in your attack animations. We can use Blaze's energy orb as an example, look how Abadede will stuck in the first frame after I add hit-pause and change delay on the second test:

 
And what in attack is causing this behaviour ? Heres whole chain combo.

I really really do not like adjusting player and enemy just to get simple pain working, when it works totally fine with everything else without any changes, this situation is different tho cause its obstacle that does not have pain, it is easier for me to add other npc entities to ignore list of the player when he attacks npc type , so only this obstacle npc hybrid can be hit. cause im not changing fundamentals in the engine at all when i do it the old change entity type version of this . I had it in other games and in he-man, the only issue was i had to destroy it to move on, so id rather work on this.
Code:
anim    attack1
    loop    0
shadowcoords 27 237
    offset    77 253
    bbox 48 17 60 236
    delay    3
    fastattack    1
    forcedirection    -1
    sound    data/sounds/a1.wav
alphamask data/chars/heman/a_000-mask.png
    hitflash flash3
frame    data/chars/heman/a_000.png
     attack    93 10 126 99 4 0 0 0 9 60
    dropv 3.0 1.0
    delay    4
alphamask data/chars/heman/a_001-mask.png
frame    data/chars/heman/a_001.png
    attack none
     delay 3
alphamask data/chars/heman/a_002-mask.png
frame    data/chars/heman/a_002.png
alphamask data/chars/heman/a_003-mask.png
frame    data/chars/heman/a_003.png
idle  1
alphamask data/chars/heman/a_004-mask.png
frame    data/chars/heman/a_004.png
  

anim    attack2
    loop    0
shadowcoords 21 228
    offset    71 244
    bbox 53 10 60 236
    delay    3
alphamask data/chars/heman/at_000-mask.png
frame    data/chars/heman/at_000.png
        fastattack    1
            forcedirection    -1
    attack     79 38 156 80 4 0 1 0 0 60
    hitflash flash3
    sound    data/sounds/a2.wav
    delay 4
alphamask data/chars/heman/at_001-mask.png
frame    data/chars/heman/at_001.png
    attack    0 0 0 0 0 0 0 0 9 0
    dropv 2.5 1.0
alphamask data/chars/heman/at_002-mask.png
frame    data/chars/heman/at_002.png
alphamask data/chars/heman/at_003-mask.png
frame    data/chars/heman/at_003.png
alphamask data/chars/heman/at_004-mask.png
frame    data/chars/heman/at_004.png
    idle    1
alphamask data/chars/heman/at_005-mask.png
frame    data/chars/heman/at_005.png
alphamask data/chars/heman/at_006-mask.png
frame    data/chars/heman/at_006.png
alphamask data/chars/heman/at_007-mask.png
frame    data/chars/heman/at_007.png


anim    attack3
        @script
                void self = getlocalvar("self");
                int iPIndex = getentityproperty(self,"playerindex"); //Get player index
                void p1 = playerkeys(iPIndex, 0, "moveright");
                void p2 = playerkeys(iPIndex, 0, "moveleft");
                 void p3 = playerkeys(iPIndex, 0, "moveup");
                 if ((p1)&&(frame == 0)&&(getentityproperty(self, "direction")==1)){
                changeentityproperty(self, "animation", openborconstant("ANI_ATTACK4"));
        }
        if ((p2)&&(frame == 0)&&(getentityproperty(self, "direction")==0)){
                changeentityproperty(self, "animation", openborconstant("ANI_ATTACK4"));
                }
    @end_script 
    loop    0
    cancel    8 18 1 F D A freespecial1
    cancel    8 18 1 D F A freespecial6
shadowcoords 74 231
    offset 124 247
    bbox    70 15 75 232
    delay    6
alphamask data/chars/heman/ata_000-mask.png
    hitflash flash3
frame    data/chars/heman/ata_000.png
     delay 3
alphamask data/chars/heman/ata_001-mask.png
frame    data/chars/heman/ata_001.png
        move 60
alphamask data/chars/heman/ata_002-mask.png
frame    data/chars/heman/ata_002.png
         fastattack    1
    forcedirection    -1
    attack    27 34 264 162 40  1 0 0 22 60
    dropv 3.0 9.0
    hitfx data/sounds/beat2.wav
shadowcoords 70 231
    offset 120 247

alphamask data/chars/heman/ata_003-mask.png
frame    data/chars/heman/ata_003.png
         move 10 0
alphamask data/chars/heman/ata_004-mask.png
frame    data/chars/heman/ata_004.png
    attack none
     delay 9
    move 0
alphamask data/chars/heman/ata_005-mask.png
frame    data/chars/heman/ata_005.png
    delay  15
alphamask data/chars/heman/ata_006-mask.png
frame    data/chars/heman/ata_006.png
    delay  6
alphamask data/chars/heman/ata_007-mask.png
frame    data/chars/heman/ata_007.png
alphamask data/chars/heman/ata_008-mask.png
frame    data/chars/heman/ata_008.png
shadowcoords 73 231
    offset 123 247
alphamask data/chars/heman/ata_009-mask.png
frame    data/chars/heman/ata_009.png
shadowcoords 75 231
        offset 125 247
alphamask data/chars/heman/ata_010-mask.png
frame    data/chars/heman/ata_010.png
alphamask data/chars/heman/ata_011-mask.png
frame    data/chars/heman/ata_011.png
  

anim    attack4
    loop    0
    jugglecost    4
shadowcoords 26 302
    offset    76 318
    bbox 60 82 60 236
    delay    4
    cancel    7 18 1 F D A freespecial1
    cancel    7 18 1 D F A freespecial6
    jugglecost    3
alphamask data/chars/heman/uper_000-mask.png
frame    data/chars/heman/uper_000.png
alphamask data/chars/heman/uper_001-mask.png
frame    data/chars/heman/uper_001.png
alphamask data/chars/heman/uper_002-mask.png
    hitfx data/sounds/beat2.wav
frame    data/chars/heman/uper_002.png
     move  30
alphamask data/chars/heman/uper_003-mask.png
frame    data/chars/heman/uper_003.png
     delay 6
         fastattack    1
             forcedirection    -1
    attack    8 18 208 222 40 1 0 0 0 60
    dropv 12.0 3.0
    move  0
alphamask data/chars/heman/uper_004-mask.png
frame    data/chars/heman/uper_004.png
    attack none
alphamask data/chars/heman/uper_005-mask.png
frame    data/chars/heman/uper_005.png
alphamask data/chars/heman/uper_006-mask.png
frame    data/chars/heman/uper_006.png
alphamask data/chars/heman/uper_005-mask.png
frame    data/chars/heman/uper_005.png
alphamask data/chars/heman/uper_006-mask.png
frame    data/chars/heman/uper_006.png
     delay  7
alphamask data/chars/heman/uper_007-mask.png
frame    data/chars/heman/uper_007.png
alphamask data/chars/heman/uper_008-mask.png
frame    data/chars/heman/uper_008.png
alphamask data/chars/heman/uper_009-mask.png
frame    data/chars/heman/uper_009.png
alphamask data/chars/heman/uper_010-mask.png
frame    data/chars/heman/uper_010.png
 
And what in attack is causing this behaviour ? Heres whole chain combo.

I really really do not like adjusting player and enemy just to get simple pain working, when it works totally fine with everything else without any changes, this situation is different tho cause its obstacle that does not have pain, it is easier for me to add other npc entities to ignore list of the player when he attacks npc type , so only this obstacle npc hybrid can be hit. cause im not changing fundamentals in the engine at all when i do it the old change entity type version of this . I had it in other games and in he-man, the only issue was i had to destroy it to move on, so id rather work on this.
Code:
anim    attack1
    loop    0
shadowcoords 27 237
    offset    77 253
    bbox 48 17 60 236
    delay    3
    fastattack    1
    forcedirection    -1
    sound    data/sounds/a1.wav
alphamask data/chars/heman/a_000-mask.png
    hitflash flash3
frame    data/chars/heman/a_000.png
     attack    93 10 126 99 4 0 0 0 9 60
    dropv 3.0 1.0
    delay    4
alphamask data/chars/heman/a_001-mask.png
frame    data/chars/heman/a_001.png
    attack none
     delay 3
alphamask data/chars/heman/a_002-mask.png
frame    data/chars/heman/a_002.png
alphamask data/chars/heman/a_003-mask.png
frame    data/chars/heman/a_003.png
idle  1
alphamask data/chars/heman/a_004-mask.png
frame    data/chars/heman/a_004.png
 

anim    attack2
    loop    0
shadowcoords 21 228
    offset    71 244
    bbox 53 10 60 236
    delay    3
alphamask data/chars/heman/at_000-mask.png
frame    data/chars/heman/at_000.png
        fastattack    1
            forcedirection    -1
    attack     79 38 156 80 4 0 1 0 0 60
    hitflash flash3
    sound    data/sounds/a2.wav
    delay 4
alphamask data/chars/heman/at_001-mask.png
frame    data/chars/heman/at_001.png
    attack    0 0 0 0 0 0 0 0 9 0
    dropv 2.5 1.0
alphamask data/chars/heman/at_002-mask.png
frame    data/chars/heman/at_002.png
alphamask data/chars/heman/at_003-mask.png
frame    data/chars/heman/at_003.png
alphamask data/chars/heman/at_004-mask.png
frame    data/chars/heman/at_004.png
    idle    1
alphamask data/chars/heman/at_005-mask.png
frame    data/chars/heman/at_005.png
alphamask data/chars/heman/at_006-mask.png
frame    data/chars/heman/at_006.png
alphamask data/chars/heman/at_007-mask.png
frame    data/chars/heman/at_007.png


anim    attack3
        @script
                void self = getlocalvar("self");
                int iPIndex = getentityproperty(self,"playerindex"); //Get player index
                void p1 = playerkeys(iPIndex, 0, "moveright");
                void p2 = playerkeys(iPIndex, 0, "moveleft");
                 void p3 = playerkeys(iPIndex, 0, "moveup");
                 if ((p1)&&(frame == 0)&&(getentityproperty(self, "direction")==1)){
                changeentityproperty(self, "animation", openborconstant("ANI_ATTACK4"));
        }
        if ((p2)&&(frame == 0)&&(getentityproperty(self, "direction")==0)){
                changeentityproperty(self, "animation", openborconstant("ANI_ATTACK4"));
                }
    @end_script
    loop    0
    cancel    8 18 1 F D A freespecial1
    cancel    8 18 1 D F A freespecial6
shadowcoords 74 231
    offset 124 247
    bbox    70 15 75 232
    delay    6
alphamask data/chars/heman/ata_000-mask.png
    hitflash flash3
frame    data/chars/heman/ata_000.png
     delay 3
alphamask data/chars/heman/ata_001-mask.png
frame    data/chars/heman/ata_001.png
        move 60
alphamask data/chars/heman/ata_002-mask.png
frame    data/chars/heman/ata_002.png
         fastattack    1
    forcedirection    -1
    attack    27 34 264 162 40  1 0 0 22 60
    dropv 3.0 9.0
    hitfx data/sounds/beat2.wav
shadowcoords 70 231
    offset 120 247

alphamask data/chars/heman/ata_003-mask.png
frame    data/chars/heman/ata_003.png
         move 10 0
alphamask data/chars/heman/ata_004-mask.png
frame    data/chars/heman/ata_004.png
    attack none
     delay 9
    move 0
alphamask data/chars/heman/ata_005-mask.png
frame    data/chars/heman/ata_005.png
    delay  15
alphamask data/chars/heman/ata_006-mask.png
frame    data/chars/heman/ata_006.png
    delay  6
alphamask data/chars/heman/ata_007-mask.png
frame    data/chars/heman/ata_007.png
alphamask data/chars/heman/ata_008-mask.png
frame    data/chars/heman/ata_008.png
shadowcoords 73 231
    offset 123 247
alphamask data/chars/heman/ata_009-mask.png
frame    data/chars/heman/ata_009.png
shadowcoords 75 231
        offset 125 247
alphamask data/chars/heman/ata_010-mask.png
frame    data/chars/heman/ata_010.png
alphamask data/chars/heman/ata_011-mask.png
frame    data/chars/heman/ata_011.png
 

anim    attack4
    loop    0
    jugglecost    4
shadowcoords 26 302
    offset    76 318
    bbox 60 82 60 236
    delay    4
    cancel    7 18 1 F D A freespecial1
    cancel    7 18 1 D F A freespecial6
    jugglecost    3
alphamask data/chars/heman/uper_000-mask.png
frame    data/chars/heman/uper_000.png
alphamask data/chars/heman/uper_001-mask.png
frame    data/chars/heman/uper_001.png
alphamask data/chars/heman/uper_002-mask.png
    hitfx data/sounds/beat2.wav
frame    data/chars/heman/uper_002.png
     move  30
alphamask data/chars/heman/uper_003-mask.png
frame    data/chars/heman/uper_003.png
     delay 6
         fastattack    1
             forcedirection    -1
    attack    8 18 208 222 40 1 0 0 0 60
    dropv 12.0 3.0
    move  0
alphamask data/chars/heman/uper_004-mask.png
frame    data/chars/heman/uper_004.png
    attack none
alphamask data/chars/heman/uper_005-mask.png
frame    data/chars/heman/uper_005.png
alphamask data/chars/heman/uper_006-mask.png
frame    data/chars/heman/uper_006.png
alphamask data/chars/heman/uper_005-mask.png
frame    data/chars/heman/uper_005.png
alphamask data/chars/heman/uper_006-mask.png
frame    data/chars/heman/uper_006.png
     delay  7
alphamask data/chars/heman/uper_007-mask.png
frame    data/chars/heman/uper_007.png
alphamask data/chars/heman/uper_008-mask.png
frame    data/chars/heman/uper_008.png
alphamask data/chars/heman/uper_009-mask.png
frame    data/chars/heman/uper_009.png
alphamask data/chars/heman/uper_010-mask.png
frame    data/chars/heman/uper_010.png
It's hard to identify where the problem is without a visual example but I saw some high hit-pause values like 22. So, if I understood correctly you said that this specific obstacle entity does not have a pain, but has an animation to react when taking damage, right? I suggest checking this animation to see if the first frames have a too big delay, once you said it only happens in this entity.
Using my game as an example, all pains have a delay around 4 or below and it allows me to perform fast hits and still show at least two frames of the pain animation in each hit.
 
Its also why i dont want to change the old way - cause i get extra issues and i have no clue what causes them so its unstable on my end here.

Code:
anim    pain
    loop 0
    offset    168 264
    bbox 134 24 65 244
     delay    2
     sound   data/sounds/drumpain.wav
     @cmd    changeentityproperty getlocalvar("self") "health" 1111
 @cmd changeentityproperty getlocalvar("self") "velocity" 0.5  NULL()
    alphamask data/sprites/omann_001-mask.png
    frame    data/sprites/omann_001.png
    alphamask data/sprites/omann_002-mask.png
    frame    data/sprites/omann_002.png
    alphamask data/sprites/omann_003-mask.png
    frame    data/sprites/omann_003.png
    alphamask data/sprites/omann_004-mask.png
    frame    data/sprites/omann_004.png
    alphamask data/sprites/omann_005-mask.png
    frame    data/sprites/omann_005.png
    alphamask data/sprites/omann_006-mask.png
    frame    data/sprites/omann_006.png
    alphamask data/sprites/omann_007-mask.png
    frame    data/sprites/omann_007.png
     @cmd changeentityproperty getlocalvar("self") "velocity" 0  NULL()
     delay  3
    alphamask data/sprites/omann_007-mask.png
    frame    data/sprites/omann_007.png
    alphamask data/sprites/omann_006-mask.png
    frame    data/sprites/omann_006.png
    alphamask data/sprites/omann_005-mask.png
    frame    data/sprites/omann_005.png
    alphamask data/sprites/omann_004-mask.png
    frame    data/sprites/omann_004.png
    alphamask data/sprites/omann_003-mask.png
    frame    data/sprites/omann_003.png
    alphamask data/sprites/omann_002-mask.png
    frame    data/sprites/omann_002.png
    alphamask data/sprites/omann_001-mask.png
    frame    data/sprites/omann_001.png
     alphamask data/sprites/omann_000-mask.png
    frame    data/sprites/omann_000.png

 






anim    backpain
     loop 0
    offset    73 261
    bbox 43 21 63 244
    delay    2
    sound   data/sounds/drumpain.wav
    @cmd    changeentityproperty getlocalvar("self") "health" 1111
 @cmd changeentityproperty getlocalvar("self") "velocity" -0.5  NULL()
    alphamask data/sprites/pman_001-mask.png
    frame    data/sprites/pman_001.png
    alphamask data/sprites/pman_002-mask.png
    frame    data/sprites/pman_002.png
    alphamask data/sprites/pman_003-mask.png
    frame    data/sprites/pman_003.png
    alphamask data/sprites/pman_004-mask.png
    frame    data/sprites/pman_004.png
    alphamask data/sprites/pman_005-mask.png
    frame    data/sprites/pman_005.png
    alphamask data/sprites/pman_006-mask.png
    frame    data/sprites/pman_006.png
    alphamask data/sprites/pman_007-mask.png
    frame    data/sprites/pman_007.png
         @cmd changeentityproperty getlocalvar("self") "velocity" 0  NULL()
              delay  3
    alphamask data/sprites/pman_007-mask.png
    frame    data/sprites/pman_007.png
    alphamask data/sprites/pman_006-mask.png
    frame    data/sprites/pman_006.png
    alphamask data/sprites/pman_005-mask.png
    frame    data/sprites/pman_005.png
    alphamask data/sprites/pman_004-mask.png
    frame    data/sprites/pman_004.png
    alphamask data/sprites/pman_003-mask.png
    frame    data/sprites/pman_003.png
    alphamask data/sprites/pman_002-mask.png
    frame    data/sprites/pman_002.png
    alphamask data/sprites/pman_001-mask.png
    frame    data/sprites/pman_001.png
     alphamask data/sprites/pman_000-mask.png
    frame    data/sprites/pman_000.png
 
Its also why i dont want to change the old way - cause i get extra issues and i have no clue what causes them so its unstable on my end here.

Code:
anim    pain
    loop 0
    offset    168 264
    bbox 134 24 65 244
     delay    2
     sound   data/sounds/drumpain.wav
     @cmd    changeentityproperty getlocalvar("self") "health" 1111
 @cmd changeentityproperty getlocalvar("self") "velocity" 0.5  NULL()
    alphamask data/sprites/omann_001-mask.png
    frame    data/sprites/omann_001.png
    alphamask data/sprites/omann_002-mask.png
    frame    data/sprites/omann_002.png
    alphamask data/sprites/omann_003-mask.png
    frame    data/sprites/omann_003.png
    alphamask data/sprites/omann_004-mask.png
    frame    data/sprites/omann_004.png
    alphamask data/sprites/omann_005-mask.png
    frame    data/sprites/omann_005.png
    alphamask data/sprites/omann_006-mask.png
    frame    data/sprites/omann_006.png
    alphamask data/sprites/omann_007-mask.png
    frame    data/sprites/omann_007.png
     @cmd changeentityproperty getlocalvar("self") "velocity" 0  NULL()
     delay  3
    alphamask data/sprites/omann_007-mask.png
    frame    data/sprites/omann_007.png
    alphamask data/sprites/omann_006-mask.png
    frame    data/sprites/omann_006.png
    alphamask data/sprites/omann_005-mask.png
    frame    data/sprites/omann_005.png
    alphamask data/sprites/omann_004-mask.png
    frame    data/sprites/omann_004.png
    alphamask data/sprites/omann_003-mask.png
    frame    data/sprites/omann_003.png
    alphamask data/sprites/omann_002-mask.png
    frame    data/sprites/omann_002.png
    alphamask data/sprites/omann_001-mask.png
    frame    data/sprites/omann_001.png
     alphamask data/sprites/omann_000-mask.png
    frame    data/sprites/omann_000.png

 






anim    backpain
     loop 0
    offset    73 261
    bbox 43 21 63 244
    delay    2
    sound   data/sounds/drumpain.wav
    @cmd    changeentityproperty getlocalvar("self") "health" 1111
 @cmd changeentityproperty getlocalvar("self") "velocity" -0.5  NULL()
    alphamask data/sprites/pman_001-mask.png
    frame    data/sprites/pman_001.png
    alphamask data/sprites/pman_002-mask.png
    frame    data/sprites/pman_002.png
    alphamask data/sprites/pman_003-mask.png
    frame    data/sprites/pman_003.png
    alphamask data/sprites/pman_004-mask.png
    frame    data/sprites/pman_004.png
    alphamask data/sprites/pman_005-mask.png
    frame    data/sprites/pman_005.png
    alphamask data/sprites/pman_006-mask.png
    frame    data/sprites/pman_006.png
    alphamask data/sprites/pman_007-mask.png
    frame    data/sprites/pman_007.png
         @cmd changeentityproperty getlocalvar("self") "velocity" 0  NULL()
              delay  3
    alphamask data/sprites/pman_007-mask.png
    frame    data/sprites/pman_007.png
    alphamask data/sprites/pman_006-mask.png
    frame    data/sprites/pman_006.png
    alphamask data/sprites/pman_005-mask.png
    frame    data/sprites/pman_005.png
    alphamask data/sprites/pman_004-mask.png
    frame    data/sprites/pman_004.png
    alphamask data/sprites/pman_003-mask.png
    frame    data/sprites/pman_003.png
    alphamask data/sprites/pman_002-mask.png
    frame    data/sprites/pman_002.png
    alphamask data/sprites/pman_001-mask.png
    frame    data/sprites/pman_001.png
     alphamask data/sprites/pman_000-mask.png
    frame    data/sprites/pman_000.png
Maybe you have other script events affecting the entity, currently I'm using a similar method to Ilu and works fine with the proper hit-pause and delay values coded.

 
Does your pain ahs delay 2 and each frame is different? I need delay 2 and animated pain, i know most of the stuff you guys use does not use so many frames so delays are slower, maybe its why i get problems and what i see you dont really see .
I moved on from it leavint it as npc but might come back to it to pinpoint the issue later.
Id paste the code but its already changed.
I need obstacle entity to play different pain anim when its hit from left side and rightside so i was using backpain 1.
 
@bWWd Recently, I made a obstacle with pain animations. But since I needed multiple "stages" (like half broken), it was easier to make this obstacle as an enemy instead.
I plan to reuse this on some stages, where I will just add a code to make them to turn into TYPE OBSTACLES
 
yeah i use npc and add some npcs to ignore list when i dont want npcs to be hurt . Npc isnt added to group, enemy type wont cut it for me.
 
Back
Top Bottom