How to proceed with turn after a forced action

Discussion in 'Javascript/Plugin Support' started by Amy Pond, Jun 18, 2016.

  1. Amy Pond

    Amy Pond Veteran Veteran

    Likes Received:
    First Language:
    English (UK)
    I am using this script to force an action in battle:


    After forcing the action, how do I then end the turn and go to the enemy's turn?

    I want to run this action instead of the player's choices.

    I have tried BattleManager.processForcedAction(); this shows the action but doesn't do anything afterwards. I need to end the player's turn as if they have done their part, the forced action is all they do.
  2. Biestmann

    Biestmann Heaven's Height Veteran

    Likes Received:
    First Language:
    Primarily Uses:
    Bumping this as I would like a resolution for the problem as well. I am working on a 'Frozen' state that has the afflicted perform a 'Wait' action and end the turn directly after. Currently, the afflicted performs the 'Wait' action and then another. Obviously, that is no good. I am aware of the 'cannot move' restriction, but that approach causes certain issues with Yanfly's plugins, which is why I would like to effect the same via javascript.

    Thank you!
  3. alcreator440

    alcreator440 Veteran Veteran

    Likes Received:
    First Language:
    Primarily Uses:
    I dont know what plugins you're using but if you use Yanfly's Buffs & States plugin then give them a state that seals their actions and then use this java code:
    <Custom Turn Start Effect>
    BattleManager.queueForceAction(user, id, target);
    </Custom Turn Start Effect>

    If you just want to give the player a different option at the beginning of the turn then Yanfly's Weapon Unleash plugin could work. Just give whatever skill you want to be use and 100% proc rate on a state or something.

    Maybe have the state seal all of the character's skills? And if you're using's Yanfly's Visual States plugin you can give the 'damaged' effect to the afflicted. If you want to prevent them from using items you could just make them all action sequences and put a break action if condition if they are afflicted with the state. Personally I'm using many of Yanfly's plugins and I haven't had much trouble with the cannot move flag. The other flags have given me problems though.

Share This Page