[SOLVED]Play a sound and animation whenever a critical hit occurs?

● ARCHIVED · READ-ONLY
Started by cedr777 1 posts View original ↗
  1. Hi, I want to create an effect that whenever a critical hit happens, a shuddering sound plays and blood animation splatters. Kind of like DOTA2's coup de grace, how can I do that?

    Edit: I was able to play an SE using VE_CriticalHitEffects, but it conflicts with Yanfly's YEP_X_CriticalControl. It's messing up the damage formula that I set for Yanfly's YEP_X_CriticalControl and I cannot remove it.


    I did it by adding this notetag code to an Actor's note field, I just want this feature.
    <custom critical code>
    AudioManager.playSe({name:'Coup_de_Grace_target', pan: 0, pitch: 100, volume: 100});
    </custom critical code>

    Can anyone help me modify VE_CriticalHitEffects so that it doesn't disrupt the damage formula of Yanfly's YEP_X_CriticalControl?

    Or Maybe suggest another workaround?

    EDIT: SOLVED!

    Using Yanfly's Buffs and States core together with the AutoPassiveStates and the lunatic code:

    <Custom Establish Effect>

    if (this.isPhysical() && target.result().hpDamage > 0 && target.result().critical) {

    $gameTemp.reserveCommonEvent(X);

    }

    </Custom Establish Effect>

    just create a state then add that <Passive State: X> to the Actor notetag.
    The common event should contain the audio that you want to play, it can even include animations and other things you want.