I got this script from activeden.net but I have no idea on how to to make it give me more than 1 score? can someone please just take a look and tell me what I need to change so it can give me more than 1 score?
Score Script Here
Oct 02, 2011 at 09:12 AM
There is a line which reads
instead replace that entire function with:
function scoreMany (points : int)
score += points
then, when you are calling the score function, call it with
Oct 02, 2011 at 09:26 AM
I'm a total noobie, you couldn't copy what I wrote and fix it?
Isn't it much more convenient to actually know scripting yourself if you're programming? ;-) If you're struggling with the very basics of coding then read through the scripting references, go through tutorials within the area you find yourself having issues with. It's a winning situation for you.
Alright, I figured it out by myself but I got another problem now, it's says I got no reciver...
Are you using SendMessage for anything? Make sure you spelled everything right, and are giving the correct paramaters.
yes, I'm using sendMessage:
function OnControllerColliderHit (hit : ControllerColliderHit )
// make sure that we have a reference to the game controller, to tell about the pickup
// check to see if the object we hit is on layer 8, which is the 'pickup' layer
// tell our game controller to increase our score
// delete the pickup object completely from the game scene
// Debug.DrawRay(hit.point, hit.normal);
if (hit.moveDirection.y > 0.01)
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
The best place to ask and answer questions about development with Unity.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
asked: Oct 02, 2011 at 09:12 AM
Seen: 1264 times
Last Updated: Oct 02, 2011 at 02:45 PM
camera script problems
Adding variable not work in an extended script
How to create a point/score system based on player performance.
Script Switch problems
hey guys i have a shoot problem
Having trouble updating the text in my GUI
Scores/points when you destroy something?
Kill Counter --> Score
after colliding problems
error saying first person controller prefab is missing Camera wont let me mouselook in game