How do I make a basic stun mechanic?

Discussion in 'Javascript/Plugin Support' started by SOC, Dec 7, 2018.

  1. SOC

    SOC "God is my Judge" Veteran

    Messages:
    542
    Likes Received:
    434
    Location:
    KY, USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I have a basic mechanic I want to try making, where the boss charges up something powerful, then you hit them with an ability that stuns, it interrupts their charging and then they skip said ability and move on to the next phase. But if you don't stun them in time, the boss uses the ability and oneshots you. I like using Yanfly ATB, so I'm thinking I'll need to use Yanfly's Battle AI Core to do this, and make the stun ability an ATB interrupt but also apply a stun state, that if the state is active it turns a switch on, and if the switch is on then the boss doesn't use the ability.

    Is there a more obvious way that I'm not aware of?
     
    #1
  2. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    10,306
    Likes Received:
    9,524
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Just add a state that adds stun. As long as stun has something in it that says cannot move, the enemy will not get that turn, and will skip the turn in the attack pattern.

    Now, since you are on an ATB system you'll have to set it up so that the stun lasts long enough, which may require some playing around.
     
    #2
  3. Uzuki

    Uzuki Kawaii on the streets, Senpai in the sheets Veteran

    Messages:
    1,702
    Likes Received:
    1,143
    Location:
    Georgia
    First Language:
    English
    Primarily Uses:
    RMMV
    Are you asking how to make an charge attack mechanic also?
     
    #3
  4. SOC

    SOC "God is my Judge" Veteran

    Messages:
    542
    Likes Received:
    434
    Location:
    KY, USA
    First Language:
    English
    Primarily Uses:
    RMMV
    It doesn't seem to skip the turn in the attack pattern, though. The enemy just goes back to repeat that turn as if it never happened.

    [​IMG]
    [​IMG]

    I have <ATB Interrupt> on the skill it self. Have I set up something incorrectly?

    Hmm, I was just making a second skill called "Charging..." that I set the boss to do one turn before they used the actual ability, but I guess learning how to do it more properly would be very helpful. Especially since if I want you to stun the actual cast time, then this current method I'm using isn't very intuitive. So yes please, if you don't mind, I'd love to learn a better way.
     
    #4
  5. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    10,306
    Likes Received:
    9,524
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Is Long Cast the skill you want to stop? If so what is happening is the engine still thinks it is on turn 0 when the bar fills, so it will do that skill.

    ATB systems use a tick system to decide when a new turn has passed. You need to set up your system so the correct number of ticks = one turn, and make sure that enemy does not fill the bar before the turn passes. That's what I meant when I said you may need to play with the turn length.

    I've moved this thread to Plug-In Support. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #5
  6. SOC

    SOC "God is my Judge" Veteran

    Messages:
    542
    Likes Received:
    434
    Location:
    KY, USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Well the forum description was "How do I and How to", it seemed like this applied much more to the basic RMMV enemy turn conditions than specifically "ATB plugin support" so that's why I thought that was the correct forum. Are you saying if I don't use ATB then it will work the way I have it set up?
     
    #6
  7. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    10,306
    Likes Received:
    9,524
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    It should, as it works that way for me. So it does have to be a plug-in that is causing the issue. But to clarify is it Long Cast you want to interrupt? Also you may wish to post a screenshot of your stun skill as well.
     
    #7
  8. SOC

    SOC "God is my Judge" Veteran

    Messages:
    542
    Likes Received:
    434
    Location:
    KY, USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Yes it is, I set Long Cast to have a -2000 speed in the database to make it take as long as possible to charge, and I'm sure I can use other ATB notetags to make it longer.

    [​IMG]
     
    #8

Share This Page