Show number
Shpint
Member Posts: 404
Hi all,
How can I show a number on screen. Like the amount of character with this "TAG" on screen?
Thanks
How can I show a number on screen. Like the amount of character with this "TAG" on screen?
Thanks
Comments
i.e.
Lets say you're spawning charcaters on to the screen
Create a global integer attribute and call it something like character.count with a value of 0
On your character;
change attribute - character.count to character.count+1
Then you will need to create a new actor,name it what you like, then inside;
Behaviour - Display Text - use the expression editor (e) next to the blank box and then find the game attribute called 'character.count'
That way, when a new character is spawned onto the scene it adds 1 to the character count value and the display text acor will display the number for you.
If your character is going to die you may want to add a rule on the character that says change attribute game.character.count to game.character.count - 1 before the character is destroyed.
You may not be spawning characters but the principles are still the same