- Home /
How to make different score for different character in one scene?,how to make a different score for different character in one scene game play?
i need some help. i want make a game endless runner. then i just have 1 gameplay scene, 15 character.
I want to make a game with the level of difficulty from the character .. so I need scores, top scores and table scores are different for each character in one scene?
Answer by OneCept-Games · Jan 02, 2018 at 11:35 AM
Assuming you know how to set up collision- and scripts to check for Character hits, you should just define a public Score variable in a script and attach this script to your character game objects, and then you can assign different scores to each type of character, and counting this score up in your collision hit script. With the level of detail you provide, above is my best guess. If I am misunderstanding your question, then please clarify.
thanks for your help. your answer is correct what i mean. but how i declare this score in table score for many character and the table score integrated with facebook? i need help bro.
1: What you mean "table score"? A saved high score table on disk? 2: Facebook is way out of scope of this question ;-)
You just save the score data to a file, and provide a character index or id for each record of score. You can use UnityEngine.IO class to save and load your data from a class object like:
class Character {
int charIndex;
int score;
}
Answer by rhendra · Jan 08, 2018 at 04:39 PM
thanks.. you have great unity programming skill i am beginner.. do you have some tips for me ? i want like you whould you show me your game
I got started with unity's Roll a Ball tutorial. https://unity3d.com/learn/tutorials/s/roll-ball-tutorial