edited November 2022 in ORK Support
Hello,

I've tried several iterations on these schematics and can't get this to work.

TLDR; What is the proper way (if possible?) for a Grid Cell Event Schematic to change scenes during a battle, in to a new battle in a new scene?

The goal is to have a "zone line" of cells when you move on it, you go to the next map. (I currently have a choice dialogue asking are you sure you want to leave the zone?")

I did some cells with a Grid Cell Event calls a schematic that Ends the battle, changes scenes (new scene has a new battle and new Grid).

I thought this would be simple Clear Gains --> Destroy All combatants --> End Battle --> Load Scene --> Battle in new scene is on Auto Start --> Start.

It worked but the auto-start on the next battle doesn't seem to fire on scene load so the player is just floating in the air.

Another confusion for me is that a Scene Changer set to None, the Battle spawns/places on grid works fine. (I have Spawn combatants, Spawn All and Place all on grid in Battle Start schematic).
However on a Load Scene Node set to None the battle doesn't seem to be added.

I moved all the nodes to the Leave Arena schematic thinking that destroying the battle in grid cell schematic was running could be problematic I dunno.

So then I added a Start Battle node after loading the scene because the Start on the battle didn't seem to fire.
It worked and the new battle spawns enemies, BUT the old battle goes to DontDestroyOnLoad and there are combatants being spawned in the New battle from the old battle.

I'm not sure why there are combatants still from the old Battle since I did Destroy All Combatants.

Been tossing around wait nodes feeling like everything was happening on top of itself LOL.

https://imgur.com/a/XsO1zSs

Thanks!




Post edited by GeneralK on
  • The main issue is the battle not being done before the new scene (with the new battle) is loaded.
    The battle ends after the battle end schematic finished executing, but the End Battle node immediately continues without waiting for the battle to end.

    So, either have a long enough Wait node, or check the player's In Battle state (via a Check Status node) and loop until the player is no longer in battle (with a Wait node in the loop). Only load into the next scene with the new battle after that's done and the battle is really over :)
    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!
  • edited November 2022
    Thank you for the prompt support as always you rock!

    Ah yea that makes sense doh.

    I put in a loop to check and it works for the new battle spawning and old battle is gone.

    However the player is floating in the air.

    New battle is active and working, grid/enemies all spawned, everything else working.

    Same thing if I try to load the Field scene (no battles) from the Grid Cell Event schematic, the same thing happens. Stuck in the air. However If I load the Field scene(no battle) from the Leave Arena schematic (called from Cell Event Schematic) the scene loads fine (not stuck). I can't figure out the difference there.. Everything is exactly the same except calling the Load Scene before or after battle is actually ended. Anyway this doesn't matter because I don't need to wait for battle to end to load the Field-non-battle scene, I just thought it was related.

    Loading the battle scene from a scene changer (From a Field scene no battles) works fine.

    If I load the battle scene from the leave arena schematic, it loads fine too, but then the battle is not ended.

    Turned off auto-start on the battle and used Start Battle node instead, after the scene load node + Wait, in the cell event schematic. This did not have the floating issue, but it doesn't use combatant deployments, only the Own Cell deployment enemies spawned.

    So then I tried a Notify start so that I could have the Wait but still know that it's tied specifically to that configured battle. Same floating in air issue.


    Post edited by GeneralK on
  • edited November 2022
    Ok I got it all working, thanks again for your help that got me over the hump.

    I'm not quite understanding the difference between Load Scene node being ran in the Cell Event schematic compared to the End Battle schematic but it made the difference.

    The final nodes that worked for me are like

    Grid Cell Event schematic --> change variable (for Fork) --> End Battle(Leave Arena) --> Check status for In Battle (failure loop back again) --> success Change Variable (for Notify start on Battle)

    Leave Arena schematic --> Clear battle gains --> Destroy battle combatants --> Variable Fork --> Load Scene nodes
    Post edited by GeneralK on
  • Great, let me know if any issues are still occuring :)
    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.