Hey,I've been searching around a lot after a kill counter script for like 2 days now but I can't find anything that actually really works - I want my score to increase everytime I kill a zombie with like 5 points or something...
I know that I gotta have a script that tells my GUI text to change and another one to tell it when the zombie dies but I can't still get it to work... Anyone know an example I can look on or an answered question that works?
asked May 12 '11 at 02:02 PM
You could add a script to your zombies, e.g.:
The GUI script would then be:
So, whenever a zombie is destroyed it will add the points its worth to the pointer counter.
GUISKIN: Read the answer below...
Just going to create a new answer for the comment:
You can use a GUISkin for that. You create the GUISkin in Unity in Project Hierarchy, then in the GUISkin you can choose label. In there you can set a font, size, and so on.
You use the GUISkin in the code by adding:
answered May 12 '11 at 08:17 PM