How can I make that if you kill an enemy you get one more action?

I alredy made the State, but I don't know how to apply to the user. I tried adding this at the end of Yanfly's Action Sequence, but it didn't worked
Code:
if target.isStateAffected(1)
user.addState(76)
end
Any ideas? Also, this effect occurs only if you have a certain class equiped. Just in case.

I've moved this thread to Plug-In Support. Thank you.



I think you'll need much more than that, as adding a state which gives you an extra action only works if you have the state at the start of your turn. This is due to how the engine decides who gets to go and how often. You might honestly need a re-write of the entire battle engine to pull this off, unless you want the bonus turn to be the next turn in battle.
Moved to: Plug-In Support

I think you'll need much more than that, as adding a state which gives you an extra action only works if you have the state at the start of your turn. This is due to how the engine decides who gets to go and how often. You might honestly need a re-write of the entire battle engine to pull this off, unless you want the bonus turn to be the next turn in battle.
Oh well, that's an F for me. But thanks.
In the Action Sequence it looks like this:

add state 76: user

I think it only requires Act Sec Pack 1

EDIT: Neither I think the +Action will work this way but when I get home I'll try to recreate it to see what happens
It's true that Extra Actions won't work as advertised if you apply them to battlers after the actions are selected for the turn and battlers have already started to act.

There may be ways around this.

If you're using Yanfly's CTB battle system, you can conditionally adjust the order of battlers using notetags or a few lines of scripting, to make sure that the battler who just KO'ed an enemy also gets the next turn.

If you're using Yanfly's Action Sequences, you can check for a KO, and use an ACTION EFFECT line if the KO was done. The "target" for the ACTION EFFECT line would be "opponents", although you might need to get creative to ensure the battler you just KO'ed isn't hit again. This extra ACTION EFFECT line will allow the battler to use the same skill on another enemy if they score a KO, which isn't quite as good as a full turn, but it's not that bad.

If you've established that a KO was made (it sounds like you have with the state being added to the battler), you could also have the skill run a Common Event, and inside that Common Event have a Forced Action that uses the same skill or some default skill if the KO was made (then remember to remove the state 76 that indicated the battler scored a KO at the end of the Common Event!). Like above, it won't be quite as good as a full turn, but better than nothing!
You might honestly need a re-write of the entire battle engine to pull this off, unless you want the bonus turn to be the next turn in battle.

pretty much that, although, not necessarily.
you *can* force an injection of an extra action into the action list, and it doesn't take much edition of the code, but it might make the system unstable.
How about forcing one-turn paralysis on every other battler, so their turns get skipped?

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-make-that-if-you-kill-an-enemy-you-get-one-more-action.111896/