Dev Log 10

When previously play testing the game when moving the objects you are able to if they fall off the end of the world they would just be endlessly falling even if you restarted from the checkpoint. This does not work for this game as you will need the items to progress in the game. 

Therefore to have them respawn I was going to use the same code that was used to make the checkpoints and allow the character to respawn. I made duplicates of the necessary blueprints and changed them to match what item I was going to be working on. I also needed to add in code on the death box so that when that item reaches it it will destroy that one and respawn a new one. Once I had changed everything to match I needed to go into the game class blueprint and duplicate the code which was used to respawn and add in a new custom event for the item needed. 

The next step was to test run the game and when I did there was an issue where the checkpoint wasn't picking up the correct position, this made me realise that I had linked it to the players last spawn which wasn't correct. In order to fix this all that you had to do was create a new variable and link it to the corresponding spawn position. When I next tested this it was working as intended so I just had to repeat the process for all the items I wanted to respawn. I repeated the same process to the falling platforms however they were spawning back to quickly the way I chose to fix this was to add a 10 second delay which worked perfectly.

 I found this process difficult to start with as I couldn't remember all the things that I needed to change. However, the more times I done it the more I understood what things needed to be changed and also why they needed too. I mostly kept forgetting to add a new pin in the death box sequence to destroy the old actor which meant that the new one would never spawn.

This was an important step into getting the game finished as now if an item falls off the world it will respawn and you can continue instead of if the item falls off the world you can no longer progress. In the next week I will be adding in my final touches to ensure that the game is working the best it can mechanically and visually. The repetition of this step really helped me to understand what all parts of the code was doing which allowed me to get a deeper understanding of what the nodes I used could be helpful for in the future.

Comments

Popular Posts