- Home /
Question by
XanH · Nov 19, 2014 at 05:26 PM ·
javascriptprogrammingscoretriggers
Trying to make simple trigger score counter, having troubles.
I am trying to make my score go up up by one whenever it collides with a trigger, I have looked around a lot (I am aware of the extensive resources on this topic) but nothing seems to work. Clearly i'm quite terrible at programming so all help is appreciated.
This is the script I attached to an Invisible cube that is a trigger.
var currentScore : int = 0;
function OnTriggerEnter (other : Collider)
{
currentScore = currentScore + 1;
}
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Why cant I subtract point from my score? 1 Answer
Accessing scripts in the same game object 3 Answers
What is a good unityscript writing program? 1 Answer
script woe adding score 1 Answer