Solved special attack question.

Question that is answered or resolved.

DD Tokki

Well-known member

As the special attack shows in the video, the attack works on enemies and obstacles, but what I want is for the special attack (slam attack) to work only on the enemy.

type.PNG

As shown in the picture, I want to limit each attack to a type.
 
Last edited:
It's cool to see obstacles being slammed like that (y)

But anyways, you could use check script to cancel a slam/grab and perform other animation instead. This one might be more complicated but it might give better result.

As for your request, you could change candamage setting in certain animations with script but you'd also need to revert it back to default if player is hurt before the attack is performed fully.
 
It's cool to see obstacles being slammed like that (y)

But anyways, you could use check script to cancel a slam/grab and perform other animation instead. This one might be more complicated but it might give better result.

As for your request, you could change candamage setting in certain animations with script but you'd also need to revert it back to default if player is hurt before the attack is performed fully.
you're right. The desired feature is a temporary change of "candamage".
 
It's cool to see obstacles being slammed like that (y)

But anyways, you could use check script to cancel a slam/grab and perform other animation instead. This one might be more complicated but it might give better result.

As for your request, you could change candamage setting in certain animations with script but you'd also need to revert it back to default if player is hurt before the attack is performed fully.
what is the name of that script? I'll look for it.
 
what is the name of that script? I'll look for it.
@Bloodbane and @DD Tokki
Can you guys use the event_takedamage.c for the barrel? And use a nograb script?

I use this script for an enemy that could not feel pain.

Code:
void main()
{
  SuperArmorOnAnim (openborconstant("ANI_FALL35"), openborconstant("ANI_FALL32"));
}

void SuperArmorOnAnim (int PAnim1, int PAnim2){
    void ent = getlocalvar("self");
    int animation = getentityproperty(ent, "animationid");

    if(animation == PAnim1 || animation == PAnim2){

           changeentityproperty(ent, "nopain", 0);

    } else {
           changeentityproperty(ent, "nopain", 1);

    }
}
 

Attachments

  • Untitled.png
    Untitled.png
    25.3 KB · Views: 3
@Bloodbane and @DD Tokki
Can you guys use the event_takedamage.c for the barrel? And use a nograb script?

I use this script for an enemy that could not feel pain.

Code:
void main()
{
  SuperArmorOnAnim (openborconstant("ANI_FALL35"), openborconstant("ANI_FALL32"));
}

void SuperArmorOnAnim (int PAnim1, int PAnim2){
    void ent = getlocalvar("self");
    int animation = getentityproperty(ent, "animationid");

    if(animation == PAnim1 || animation == PAnim2){

           changeentityproperty(ent, "nopain", 0);

    } else {
           changeentityproperty(ent, "nopain", 1);

    }
}
Code:
    attack    26 84 30 30 0 0 0 1 0 30
    followanim    2
    followcond    1
    @cmd    dasher  2 -7 0
    frame    data/sprites/sprite/chara/griffon/skill-a05.gif

The character's special move has a structure in which the movement is forcibly changed when an attack is applied with "followanim". Super armor invalidates pain, but it still shows the same result for this special move.
 
I suggest to try using the followcond 2 or higher, which works with enemies only (or players). The followcond 1 works with any entity.

View attachment 4875
Code:
    attack    26 84 30 30 0 0 0 1 0 30
    followanim    2
    followcond    2
    @cmd    dasher  2 -7 0
    frame    data/sprites/sprite/chara/griffon/skill-a05.gif

bor - 0018.png

I did it with "followcond 2" and still got the same result.
The barrel's type is set to "obstacle".
 
Code:
    attack    26 84 30 30 0 0 0 1 0 30
    followanim    2
    followcond    2
    @cmd    dasher  2 -7 0
    frame    data/sprites/sprite/chara/griffon/skill-a05.gif

View attachment 4876

I did it with "followcond 2" and still got the same result.
The barrel's type is set to "obstacle".
Did you try the other followconds (3/4)? You could set the obstacle type to notgrab and use the followcond 4.
 
lol I never imagined that there's a connection between hostile and followcond, it solved the problem.
Utunnels teach us that trick really long time ago - I use scripts too in some cases, but this solves the issue in many others :)
Probably, since followcond needs to check the target (and it depends on what you are hostile to), you won't have this issue.

You can use the same trick for when you need to use a findtarget() function - for example, you want something that homming at enemies, but will ignore obstacles - while still damaging them :)
 
You can use the same trick for when you need to use a findtarget() function - for example, you want something that homming at enemies, but will ignore obstacles - while still damaging them :)
Yeah, I'm using hostile in the findtarget and other routines, but the connection with the followcond really surprised me. Thanks buddy :)
 
Back
Top Bottom