- Home /
How to add score/health ?
i want to send a message when my enemy dies that turns the 3d text from 0 to 1 and so on untill infinity / cap. it could represent health or mana or a score e.c.t is this possible?
i already done the coding for the send message but how do i tell it to edit the gui text?
Answer by Justin Warner · Dec 14, 2010 at 03:52 AM
http://unity3d.com/support/documentation/ScriptReference/GUIText.html
You should be able to get it from here... Import the TTF font, and then change it with that on a GUI.
Hope that helps you a little at the least =).
Answer by Persona · Dec 14, 2010 at 01:26 PM
Like this:
var Score: int = 0;
function Update () {
var text = "Score: ";
guiText.text = text + Score;
}
Attach a script like this to your GuiText and it'll work
Your answer
Follow this Question
Related Questions
Basic Question: Score System giving random numbers. 2 Answers
Calling Enemy Health Adding to Player Score 0 Answers
TextMesh update causing framerate drop 1 Answer
Checking for a value overtime 2 Answers
GUI text not updateing 1 Answer