edited January 2017 in ORK Support
Hello, I encountered an issue recently. Using turn-based battles, I have my battles happen in another scene. Everything works fine with one exception. If I use the battle menu during a battle to switch the player character, then upon returning to the previous scene, I recieve this error: MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.

There's no problem if I switch the out the player character while on the field, it's only if it's done during battle in another scene. I imagine this is because I'm loading a previous scene after finishing a fight and it's looking for the same player prefab, but technically it's been destroyed when they were exchanged during the battle?

I also have a few more questions kind of relating to party members and exchanging them.

1. Is it possible for my player character to be an entity completely separate from my combatants?
2. Is it possible to switch the order of your party members in the menu? As it stands right now I can remove and add them, but I cannot switch their order.
3. Is it possible to disable the functionality of your party members spawning outside of battle?

Thank you as always for your time.
Post edited by LNMRae on
  • 1) Somewhat, but not completely separated. After adding the player (first member) to the player group, you need to remove the combatant from the battle group (Leave Battle Group node) and hide it (Hide Member node).
    This way, the player isn't part of the battle group and hidden in any group management menus.

    2) I think remove+add is the only way currently.

    3) Yes, there's a setting in the game settings for that.

    I'll look into your error, but it shouldn't be anything serious that's halting your game.
    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!
  • I replaced the player character as per your instructions, thinking that might change something, but unfortunately it didn't. Switching out the 'leader' of the battle group while battling in another scene causes the MissingReferenceException error when it tries to reload the stored scene regardless. This leaves me with no other choice but to stop the game and restart it.

    Since the error only happens when I switch out the leader during battle, I can at least avoid the error and continue working on other things in the meantime. Thank you for looking into it. :)

    I looked under game settings and I see the option to change my battle group size, but what I'm actually looking for is to keep the battle group the same size, but only appear when combat takes place, ala something like the Final Fantasy 10.

    Thanks again for your time.
  • Yep, that's a bug, will be fixed in the next update.
    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!
  • Thanks for checking into it, much appreciated as always!
Sign In or Register to comment.