Hello!

I'm working on a pokemon-type game. Right now I'm working on "trainer" battles, which loads another scene in the Start Battle Event and goes back to the stored scene in the Battle End Event.

I had previously ran into the same issue user Jihaysse did in the 2) section of this post where when we returned to the stored scene, my player was replaced by the combatant who was battle. That was solved by a Set Player node before the Load Scene node and using the player's combatant.

Now that I'm working on trainer battles, there's dialogue after the battle, which I have put at the end of the Battle End Event. The only issue is, despite my Set Player node being before the Lode Scene node, my player does not get set back to normal until the very end of the event, after the dialogue.

Any ideas on how to fix this?
  • Well - the battle isn't technically over due to the dialogue prolonging the battle end event.

    Try using a Spawn Player node after the scene load, using Spawn Member option and Member Index 0. Requires to use a fixed spawn point, though.
    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!
  • Well, now I'm really scratching my head.

    The Spawn Player node does spawn the player, using Spawn Member option and Member Index 0. But it does not remove the the other combatant model. If I let the event end this way, the player is set to the combatant that was just in battle and the object created by Spawn Player is just the player model hanging out.

    If I destroy that combatant with a Destroy Player node (selecting it by member index 1) then at the end of the event, the player model that was spawned is not controllable, even if I add another Set Player node or even select the player model with a Search Objects mode and Use Game Object to set that as the player. I can't seem to get Switch Player nodes to work either, though I could be doing it wrong.

    Am I going about this wrong?
  • Hm, I'll do some tests - though the main issue is having the dialogue in the loaded scene in the battle end event, as that's still part of the battle, where the battle leader is the player.

    You could e.g. use an Autostart event interaction in the scene to start the dialogue instead of doing it in the battle end event.
    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.