How to proceed with turn after a forced action

Ellie Jane

Veteran
Veteran
Joined
Mar 17, 2012
Messages
752
Reaction score
1,488
First Language
English (UK)
Primarily Uses
RMMV
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.
 

Biestmann

Studio Biest
Veteran
Joined
May 18, 2015
Messages
463
Reaction score
749
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!
 

alcreator440

Veteran
Veteran
Joined
Mar 26, 2014
Messages
279
Reaction score
169
First Language
English
Primarily Uses
RMMV
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.
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.

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!
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top