I'm in the process of handling what happens when the player dies in battle. What I'd like to do is have a UI box when the player dies. Clicking on a button revives the player and enacts a death penalty via schematic. All of this is working... Except..

When the player is revived some weird things happen. For example: ORK.Game.ActiveGroup.Leader now returns null. I have a bunch of functions relying on this returning the player and they all break. So okay, after reviving the player I can call the Join Group node and have him rejoin the Active Player Group. I can also use the Set Lock Field Leader to make sure he's the leader. But now the Active Group also no longer contains my allies. Also, for some reason ORK.Game.ActiveGroup.Leader.Inventory.ContentChanged events no longer fire (maybe because the reference has changed) and pressing my assigned inventory key no longer brings up the inventory.

So before I spent all day trying to figure all this out, I just wanted to ask if there is some easy way to revive the player and the active group in such a way that it is restored to exactly the same state as it was before it died, references and all.

Thanks,
-Mike
  • Are you using the Leave On Death option in the combatant's Death Settings?

    Also, if you're doing this in the death schematic, make sure to also use a Cancel Death node.
    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 the quick reply. Your response helped me find the issue. I was triggering the menu by calling the Game Over node. This was unnecessary and was probably caused the issue. Instead I now call the menu inside the Death schematic and removed the call to the Game Over node. Now it's working.

    Also I was not able to use the Cancel Death node because I need the Battle to end and when I use Cancel Death inside the Death Schematic it prevents the Battle from ending (though maybe I could manual end the battle in the Death Schematic). But the Regenerate with Revive Dead node seems to do the trick.

    Thanks again!
  • The Game Over node ends the game, so naturally nothing will work as expected afterwards without starting a new game or loading a save game.

    If the battle should end, this is probably best used in the battle end schematic (probably the defeat one if the player lost).
    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.