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

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


    $gameParty.members()[0].forceAction(1,1);
    BattleManager.forceAction($gameParty.members()[0]);




    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.
     
    #1
  2. Biestmann

    Biestmann Heaven's Height Veteran

    Messages:
    342
    Likes Received:
    502
    First Language:
    German
    Primarily Uses:
    RMMV
    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!
     
    #2
  3. alcreator440

    alcreator440 Veteran Veteran

    Messages:
    210
    Likes Received:
    93
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    #3

Share This Page