Problem with kids cooking station.


Author: Aleksei Ratnikov

Problem: The cooking station puzzle requires the player to click buttons properly to solve it, and one of the issues was despawning actors after spawning into the engine. The problem was that I was trying to destroy actors in the CookingPuzzle event graph since that was the place I was keeping track of the player input, so I was thinking of the best way to make spawned actors destroy if the input was wrong.  After trying some stuff out, I couldn't get a reference to the spawned actor to make it despawn.


Solution: To make my puzzle work, I looked over the blueprint once more and found how I would be able to despawn actors and make it make sense. In the button blueprint, I have a function called DoOnce which only allow commands to run only once, and that function has the reset function, which led me to think that I would just destroy actors on each button when it calls reset. As well I've added the delay between wrong inputs so the player would have time to memorize what has clicked and not make that mistake again.

BP_Button1,2,3:


BP_CookingPuzzle:

Leave a comment

Log in with itch.io to leave a comment.