Issues with Testing Spawn Points


Author: Zoleda Davila

Posted on 2/29/24

A couple weeks ago, I was given the task of creating different spawn points depending on the map that the player is leaving from and entering to. At first, I created the spawn points only taking into the account of the main gameplay that a player who was beginning from the start and not when my team members had to test out their tasks in the individual maps. This caused the player to spawn outside the range of the floor of the map that they needed to test. As a result, their task completion progress was hindered by this. 


In order to solve this I implemented a function in the Game Instance that will set the spawn point differently than if they ran the game from the Main Menu. However, this also didn't work, because later down the line, I set the player's spawn location again if a save object existed. Since we do need the save object while we test things also, I needed to make sure the spawn location will not be set to the one from the save object. So, when I set the player data from the save object, I also check if the user is doing the actual gameplay or just testing the individual levels. If you are just testing, skip over setting the location to the save object's spawn location.

With these two fixes, I was able to successfully spawn into any map correctly when testing them individually. I then tested the scenario when a user plays the game from the start of the Main Menu, and was able to confirm that the spawning worked correctly. I pushed the solution and my other team members confirmed the fix to the bug. 

Leave a comment

Log in with itch.io to leave a comment.