1. Dismiss Notice
  2. Within our Resources section we have over 150 Audio files, with room to grow. You may find exactly what you have been looking for. Just CLICK HERE to start your listening adventure.
    Dismiss Notice
  3. Why would you want to upload your resources directly to RMMV.co? It makes it easier for other members to download them. Click HERE for more information.
    Dismiss Notice
  4. Click HERE to see our four new featured resources by TheUnproPro, Starbird, iblamevictoria, and VGM MarkH.
    Dismiss Notice
  5. Here are the The Resource Rules.
    Dismiss Notice
  6. Please read these RULES before posting.
    Dismiss Notice

Enable skill when state applied to enemy

Discussion in 'MV Support' started by Trumully, Jan 5, 2018.

  1. I've replaced guard in my game with a skill called Obliterate. I want this skill to only be able to target enemies with a Staggered state and instantly kill them also regaining health (like the Glory Kill in DOOM 4).
    I am currently using Yanfly's Auto Passive States to apply the Staggered state on enemies lower than 15% health and using Yanfly's Selection Control to only allow the Obliterate skill to target enemies with the Staggered state. I also want this skill to be greyed out if no enemy has the Staggered state.

    However, I have run into a few problems:
    1. Enabling this skill when the Staggered state is applied to an enemy.
    2. Disabling this skill when there is no enemy with the Staggered state.
    I must admit, I did tinker with troop events but I couldn't figure anything else. I'll keep tinkering but if there are any solutions you guys have, pray tell.
    Thanks in advance.
  2. Grabbed a bit of fancy code from Yanfly that makes the skill only allow Staggered enemies to be targeted.

    Code (Text):
    <Custom Select Condition>
    condition = target.isStateCategoryAffected('4');
    </Custom Select Condition>
    Just replace the "4" with whatever your Staggered is.

    This doesn't enable or disable the skill, but it does affect what can be targeted by it, which I guess is the next best thing? You'll need the Target Core Yanfly script for this to work.

    But beware! I'm pretty sure just replacing Guard without doing anything to the skill order will not allow you to select a target for the skill! When Obliterated is used with "1 Enemy" set as its target, it will target a random enemy without giving you the option to select. I'm pretty sure this can be circumvented just by using a plugin to change the skill order, but otherwise...

    Fair word of warning, I don't always know what I'm doing. But I'm pretty sure this will work. Sorry if it doesn't! X3
  3. Thanks @IncPara. I didn't know about that guard thing, that helps heaps.

Share This Page