Hi everybody, I'm learning scripting and in my game I need a specific script.
I'm making a game that mashup 3D and 2D scenes.
Ok so, I need a script doing this :
When the player enter a object collider (object tag = Bonus) add 500 points to the total score and destroy the object.
if the object tag is (object tag = Small Bonus), add only 250 points and destroy the object.
If the player die so, restart the level but reset the score to the first time the player entered the level.
*Exemple : If the player finish the level 1 with 500 points, start the level 2 with always 500 points obviously, and if he die after picking up some points, restart the level with 500 points.
If the player finish the level 1 with 500 points and finish the level 2 with 1000 points, so, start the level 3 with 1500 points. If he die, restart the level with 1500 points... and so on ^^*
The score need to be at the top middle and never being destroyed.
So if the player change scenes, the score will be always there.
That's it.
I need this in JS please, I can learn more easily in JS !
P;S : I'm french, sorry for my bad english.
↧