Set up the score on The Player Node
Set up the score on The Player Node
Add a CanvasLayer Node as a child of Player
Add a CanvasLayer Node as a child of Player
Then add a Label Node as a child of CanvasLayer
Then add a Label Node as a child of CanvasLayer
Rename the Label to ScoreText
Rename the Label to ScoreText
Press F to Focus on it
Press F to Focus on it
Set the Text property to Score: 0
Set the Text property to Score: 0
This is what is displayed in game
This is what is displayed in game
Customise the text
Customise the text
Add a New LabelSetting
Add a New LabelSetting
Click on the LabelSetting
Click on the LabelSetting
Change settings as shown
Change settings as shown
In Player Script
In Player Script
Add an OnReady var to
Add an OnReady var to
set the Label when the Script Loads
set the Label when the Script Loads
Update our add_score function to
Update our add_score function to
display the increase in score.
display the increase in score.
use the str function to
use the str function to
combine the integer score with a string.
combine the integer score with a string.