O'Reilly logo

Mastering Game Development with Unreal Engine 4 - Second Edition by Matt Edmonds

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using load/save to transition

Most games, especially those with a story-based single player mode or the like, though, will want the player's status after leaving, as well as the state of the level itself, to be persistent across this transition. If we make a simple portal back to FirstPersonExampleMap just like we did in the preceding section, you'll notice when switching back and forth that our player, the items, NPCs, and so on in those levels are as if we had opened them anew, rather than the state they were in when we left, and the player's inventory is loaded anew as well. So now really we need two distinct things:

  • Keeping the player's data intact across any level load
  • Loading and saving the state of that level and its dynamic objects ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required