Game Development Reference
In-Depth Information
• After hiding the collectable item, it is time to add points to the score in order to
reward the player. There is a custom event called Add Score inside the levelLay-
out blueprint, which is responsible for adding the score, so to be able to call this
blueprint, we have to search for it first and then give the call.
• Using Get All Actors Of Class , we can get a reference to all of the actor classes
inside the current level. And as we use the levelLayout class one time only inside
the level, it will return an array of one element only. By casting a variable called
Level Manager , we can save that returned reference and then call the Add Score
function on it.
• Now if you drop the levelLayout blueprint inside the level view, and tweak the
position of the Player Start element, you have a fully functional endless runner
level. Click on Play or deploy to a device, it's up to you.
Search WWH ::




Custom Search