Triggering a State/Switch after Selecting a Skill? (not using a skill)

Hey guys-

I'm trying to create a dual tech system that's kind of based on child of lights battle system.

For those not familiar, it's an ATB with a visual time progress bar. As actors progress from left to right, their TPB reaches 100 and they're ready to cast. After selecting a skill, they cast it, then their TPB is reset.

ATB.jpg


For my system, Actor 1 selects a dual tech skill. Instead of USING that skill, they're stunned in place as they WAIT for the secondary actor's turn to come up. When Actor 2's TPB reaches 100, the skill gets cast.

I know how to make everything happen with states, EXCEPT how to make the first actor wait in place. If they actually USE the skill, it doesn't make sense.
The way this is typically done is actor 1 initiates the skill and it applies two states.

One state goes on actor 1 and applies Cannot Move through their next action.

The other state goes on actor 2 and has a notetag to force them to activate the combo skill, which is a different skill ID than what actor 1 chose, and just activates the action sequence and such. Part of that skill removes both states from both actors.

Just for your info, there are other plugins that already manage all of this that you might find useful.
The way this is typically done is actor 1 initiates the skill and it applies two states.

One state goes on actor 1 and applies Cannot Move through their next action.

The other state goes on actor 2 and has a notetag to force them to activate the combo skill, which is a different skill ID than what actor 1 chose, and just activates the action sequence and such. Part of that skill removes both states from both actors.

Just for your info, there are other plugins that already manage all of this that you might find useful.

Unfortunately, HeroicJay hasn't released a 'wait' version of his turn linking, which is what I'm trying to solve for. Also had some incompatibility issues with his plugin & VS battlecore/skillscore

ATB.jpg


I'm using a visual ATB bar progression. So I want to apply the stun state to actor 1 after selecting the move, but before it's actually executed. Since the visual ATB bar makes it weird to see actor 1 execute a move when they're supposed to be waiting for actor 2.

Maybe there's some way i could hide this? feels like they need to be 'waiting' but can't figure out how to make them wait without having them actually use a move to trigger the stun/wait state.

A passive state (STUN) that's triggered by a skill selection could work. That's why i'm wondering if there's a way to flip a switch to stun the user upon skill selection, but before they actually execute the turn.
Is this the same as what you're asking for here?
In case it helps - for MZ's built-in TPB system, the startTpbCasting method of Game_Battler puts the battler into casting mode. It's called in a couple of places:
  • BattleManager.finishActorInput (rmmz_managers.js) - when their input is complete;
  • Game_Battler#makeTpbActions (rmmz_objects.js) - when they cannot input.
[Edit: whoops, it's finishActorInput, I don't know why I wrote finishTpbInput before. 😴]
In case it helps - for MZ's built-in TPB system, the startTpbCasting method of Game_Battler puts the battler into casting mode. It's called in a couple of places:
  • BattleManager.finishTpbInput (rmmz_managers.js) - when their input is complete;
  • Game_Battler#makeTpbActions (rmmz_objects.js) - when they cannot input.

Got it. I'm messing around with a common event that runs in parallel during battle to check for a few things:

◆If:Script:$gameActors._data[1]._tpbCastTime > 1
◆Play SE:Cancel3 (90, 60, 0)
◆Script:$gameActors._data[1]._tpbChargeTime = 0
: :$gameActors._data[1]._tpbState = "charging"
: :$gameActors._data[1]._tpbCastTime = 0
◆
:End
◆If:Script:$gameActors._data[2]._tpbState == "charged" && $gameActors._data[1]._tpbCastTime >= 0.2
◆Script:$gameParty.members()[0].forceAction(276, 0);
: :BattleManager.forceAction($gameParty.members()[0]);
: :this.setWaitMode('action');
◆Script:$gameActors._data[1]._tpbChargeTime = 0
: :$gameActors._data[1]._tpbState = "charging"
: :$gameActors._data[1]._tpbCastTime = 0
: :$gameActors._data[2]._tpbChargeTime = 0
: :$gameActors._data[2]._tpbState = "charging"
: :$gameActors._data[2]._tpbCastTime = 0
◆
:End

However I'm not sure how to run a conditional check for the selection of a skill. Essentially, a skill triggers Actor 1 into a casting state, and when they're casting & Actor 2 is charged, the action gets forced.

I just need to figure out how to trigger a switch when a particular skill is selected and to execute the appropriate action accordingly. Any idea how to trigger a switch on skill selection, or simply check for a skill's input?
Moderator note: @bgrizzmayne do not ignore me!

You were getting help in your other thread. Why did you post a new one for the same question?
Moderator note: @bgrizzmayne do not ignore me!

You were getting help in your other thread. Why did you post a new one for the same question?

Sorry! I altered my initial question to be more specific, tried to delete my other thread and wasn't sure how.

My other thread, I didn't denote the presence of the visual ATB bar and the specificity of wanting to trigger an event/switch PRE-cast.

Still trying to figure out how to do that.
Cool. I'll go ahead and close your other thread. You don't have the ability to delete threads, so next time, just report it and ask a mod to close it (we won't delete it as it already has some answers). But next time, please don't make multiple threads for the same question 🙂

Original thread: https://forums.rpgmakerweb.com/threads/triggering-a-state-switch-after-selecting-a-skill-not-using-a-skill.154867/