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.
  • Hi @InfaithGames

    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.
  • Thanks for the reply. I will try to implement your suggestion and will see how that goes. Also thanks for the additional tips.
  • @InfaithGames say I ran across a setting by accident that might help with the Battle Spot.

    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.
  • Yeah, battle spots are accessible like that in schematics. They are just empty game objects in the scene, so you can also move battle spots around using this if you want.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Hey @GeneralK I followed your suggestion. But using Join Battle node only gives me option to add a combatant from the Combatants editor list. But I want to provide a combatant ID as a machine start int variable from code, create a combatant using this ID and join battle with that combatant. Is there any way to achieve it.
  • You'd have to manually check the ID (e.g. Variable Fork node) and handle different setups based on that.

    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.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.