Advanced checkpoint system with NPC locations + Environment changes

Updated on January 25, 2019 in [A] Unity Scripting
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
0 on January 25, 2019

I have already implemented a checkpoint system that respawns the player at the last checkpoint they cross through. Now imagine this:

  • NPC A interacts with NPC B
  • NPC B walks over to a nearby car
  • A bird flies over the car and takes a dump
  • Player dies tragically (lol)
  • Player respawns at the last checkpoint X

Given that checkpoint X is achieved after watching all these NPC interactions, how can I fast forward/skip these interactions when respawning the player? The build I have right now respawned at the correct location but of course, the NPC interactions happen again even though they were supposed to end before reaching that last checkpoint (if that makes any sense 😀 )

I understand that this can be achieved by saving all the last known locations of the NPCs, flags that indicate whether the bird took a dump (true/false). For example, this seems quite tedious for a game like Uncharted/GTA where a lot of interactions happen at the same time.

My initial thought was to somehow fast forward the entire game to a point where all these interactions are done and dusted. That way, I can safely respawn the player knowing that they don’t see something they’ve already seen.

Sorry for the detailed post 😀 Any tips on how this can be accomplished?

  • Liked by
Reply