Question regarding .force_action(x,y) in formula box

Referring to this thread http://forums.rpgmakerweb.com/index.php?/topic/29068-custom-formula-force-action-xy/ , I have tried to put a.force_action(21,-2);200 to a skill where x is skill id and y is target index. However; the skill only deals 200 damage and the force action doesn't happen like the OP.

What could be the correct formula for .force_action to work? FYI, I test this in blank project.

Thanks.
try a direct index first - I don't know how that function works, but according to the linked topic the -2 is the last previous target - if there was no target before or if that target is already eliminated, then of course the force action doesn't work.
try a direct index first - I don't know how that function works, but according to the linked topic the -2 is the last previous target - if there was no target before or if that target is already eliminated, then of course the force action doesn't work.
I have tried 0 and -1 or target index but none works for me. Is there another way to force a character to do an action using formula box?
I don't even know if that way is possible - even in that other topic the person claiming that is possible reported problems.

Have you tried the solutions given there?

Otherwise, post a screenshot of your skill, possibly the bug is somewhere else.
I don't even know if that way is possible - even in that other topic the person claiming that is possible reported problems.

Have you tried the solutions given there?

Otherwise, post a screenshot of your skill, possibly the bug is somewhere else.
Have found another thread posted by the same OP in another site. He mentioned he uses 2 of Victor's scripts. One of them should enable him to use .force_action(x,y). However; I don't want to install the scripts just to enable force action. Need to find a way to do a force action once a skill is used. I'm designing a skill that when you attack an enemy, there is a chance to follow-up with another skill on the same target. Hime has a script to do similair thing but a follow-up skill doesn't have animation.

Do you happen to know whether there is a complete script to do such thing Andar?
No, but there might be one on the master script list - it contains over 1000 scripts, and something like this should have been wanted before.


Other than that, you might try to do that using a common event - this will make targeting a bit trickier (apply a target-identification state in the skill effects, check and remove that on the common event) and has the problem that the common events run later in the battle sequence, but it should make things easier that way.
There is probably a way to fix this (Yanfly's Battle Engine seems to overwrite several methods pertaining to Force Action but I'm not sure what the end result is there), but it's trickier than it would first appear because of the way the BattleManager handles the action list and forced actions.  You'd probably need to change the way that it clears battler-actions from the list, among other things.

In general, when I need to force an action using a skill, I just have it run a Common Event that includes a forced action.
Yanfly does have a script that adds follow up skills, with a % chance for the skill to perform. That might be what you want.
Thank you everyone for helping me out.

I'll try to look for Yanfly's script and common event to force character's action. I'll come back to this thread again if I have any question regarding this.

Original thread: https://forums.rpgmakerweb.com/threads/question-regarding-force_action-x-y-in-formula-box.39906/