Game Development Reference
In-Depth Information
Win/lose blueprints
The win or lose blueprint will be used in a separate level file. Both of them have the same
structure and logic; the only difference is in the text to be shown. So let's show you how to
make one of them and you can make the other by duplicating it and changing the text
value.
Create a new empty blueprint and name it winScreen and then add two components to it; a
camera (orthographic one) and TextRenderer . Try to adjust the text position to fit the
middle of the camera and then change its text value to a convenient phrase like You Win .
The last thing, in the blueprint logic, is that you need to set the camera component to be the
correct one to render using the Set View Target with Blend node and run it in the Event
Begin Play function with Get Player Controller as Target and keep Player Index as 0 .
Then, use a Delay node to wait for a duration of 2 seconds and then call the Open Level
node and set LevelName to base , so the player gets into the gameplay again after two
seconds. So either win or lose, the player sees the screen and after two seconds, he can go
back to playing again.
Search WWH ::




Custom Search