|
Hi guys, i tried writing a script to pick up coins so that my score goes up and the coins dissapear but now when i try my main character (named gamer) runs again the coins and keeps running but nothing happens, score doesn't go up or coins don't dissapear, someone knows a script that i could use, ty in advance.
(comments are locked)
|
|
Your code should work so let's check what could be the problem.
So first look that your debug message does get displayed. If that did not get called check the following:
If your trigger get's succesfully entered and still nothing happens the problem is probably somewhere between your score-variable and it's output. To make the coins disappear and check the score change:
Forgot the 'is triger' in my box collider, awesome work, ty for your time!
Apr 04 '12 at 06:50 AM
starvar
(comments are locked)
|

Post your script and let us help you with what you've got, it's better to learn from your mistakes than getting a finished script that doesn't match your game.
static var scoreText:String = "TotalScore: ";
static var score = 0;
function Update ()
{
}
function OnTriggerEnter( other : Collider ) {
}
function OnGUI () {
}
------CODE----- here it is