Skip to content

Score and save System

Score System



Open 3rd person BP → Add variable, name as Score
→ change to Integer
image.png

R click in Content Browser → User Interface → Widgert Blueprint → User Widget (name as Socre)
image.png
Open the widget BP → add Text → Create Binding (a new event graph is opened)
image.png
Click on the event graph, create the nodes as below (promote to variable → will create a SET node)
image.png
Go back o Get Text 0 node →
image.png


Let score to change (e.g. a character steps on a cube, score changes)


R click on Content Broswer → Create a BP class → Actor, name as Cube
image.png
Add a Cube, change collision to overlap all dynamic
create following event graph in the cube BP

image.png

To connect the score system and display in the game:

Create the following in 3rd character BP
image.png

Emissive Material nodes graph:



image.png

Engulf the point/actor when charater steps on:

In 3rh person BP, create a tag, name as Player
image.png
Open actor (case here is emissive sphere), set nodes as follow on Other Actor command on Event Begin node:


Go to 3rd person BP, create Float variable, name as Points
Go to PlayerUI BP, create Text for Points and 00
image.png
Select 00 → Details → Content, Create new binding, name as PlayerPoints
set as below (type Get Point for target point node):
image.png

Show point socre after engulf/destory sphere actor:
Open Sphere BP, modify previous BP as follow ahead Destroy actor node:
image.png

Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.