In RealtimeBattle, there are two combatants: PlayerCombatantA, and AllyCombatantB, who is controlled by AI. When the switch key is pressed, I want to switch from controlling PlayerA to controlling AllyB. (At that time, the factions of A and B will also be swapped between Player and Allies.)
I tried to create a schematic for this,
(Actor1= PlayerCombatantA, Actor3 = AllyCombatantB)
https://imgur.com/Qp0bAtXI was able to switch between A and B’s movements, but when I press the attack key, instead of B, the original A performs action.
How can I switch the combatant I’m controlling?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
The main reason is that I would like to enable the switching between states of manual control through key input and states where the character is operated by AI, regardless of whether they are players, enemies, or third-party entities.
While there may be a solution using PlayerChangeKeys, if it's possible to achieve the switching using Schematic, I would prefer to use that approach.
One thing to keep in mind here is the player group's battle group size (defined in Game > Game Settings in the player/group settings). Also, that combatant should be part of the battle (e.g. check the combatant's inspector and check the Combatant Component for the battle state information.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!