Hello,
I am trying to add a spell which will be available only for player combatant. This spell will replace the current combatant to another specific combatant permanently or for few turns. If it is applied for temporary basis, the combatant will revert back after the specific turns. The new combatant should spawn in the same battle spot and the player should be able to use its all abilities. Can someone suggest me the possible solution.
If you use Leave Battle Group node for the current combatant, it will remove it from the battle but still keep the combatant intact in the player group to bring it back later.
Then Join Battle with the new combatant and set it to the correct group. Also apply a Status Effect to use as the duration and run a schematic when the duration is up Status Change Type Schematic - Remove.
You might have to use something like Select Combatant node and store the original combatant to global Selected Data, then when the Status Effect Remove schematic runs on the replacement, can Leave Group on that combatant and Join Battle Group node Selected Data with the original.
I don't use Battle Spots so I'm unsure about that part.
Maybe someone else can help with battle spot.
My understanding is it's based on the group index, so group index 0 == Member 0 in the battle spot settings. That could maybe supply a way to do it, if you can grab the index and set it on the new combatant.
Or I do see a node Select Combatant Battle Spot to store the battle spot in to selected data, but not sure how to place a new one there. There are also nodes for forcing update on battle spots (to recheck conditions on battle spots).
Tip, in the schematic add node menu, you can search in it. Super handy for figuring things out, I just typed in battle spot is how I knew about that node.
You can set an Actor (in the Settings node of the schematic) to User Base and that stores the battle spot apparently. Might be able to spawn the replacement combatant at the actor(being the position actually), not quite sure.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Alternatively, you can write a custom schematic node that creates a combatant from script.
E.g. copy the code of the Join Battle node and modify it to your needs.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!