Hi…
I made a racing game on unity…
After race completes the user has to quit the application and has to play it again…
How to make the game run continuously with out any user input???
Hi…
I made a racing game on unity…
After race completes the user has to quit the application and has to play it again…
How to make the game run continuously with out any user input???
you can just reload the level - not sure if its the right solution, but its what I did with my first (basic) project
Are you telling me to use Application.LoadLevel(0);
If that is the case:
I don’t know why but that is not working properly…
Hmmm… how is that not working properly? Haven’t done it in a while, so can’t think of anything that can go wrong…
Try giving a level an actual name “level1” and then try Application.LoadLevel(“level1”); and see if that works
also make sure to add the level in the build settings
good luck!
if Application.LoadLevel(0); is not working is probably because you have to set it on the build settings. you are right with using that code but in order to use it or implement it you have to go to file then click on build settings then choose the scene that you want to restart and add it on the build settings for example main menu = 0 and game level = 1 so in order to load the game level it would be Application.LoadLevel(1); so in between the parentesis you would put the numer set on the build settings about which level you would like to load. and yes it won’t work in the beggining until you go to thew build settings.
good luck…
Thank you for your reply…
I have added the game level in build settings but…
The problem is that my game displays a start screen in the beginning and by using Time.time i have deactivated all the cars and activated them after some time and race starts then.
That might be problem or not but my game is not going back to the play screen, it is directly starting the race.
Thanks for your reply Gross…
Will Time.time vale also be reloaded or not???
if that won’t reload, How to reload that value???
Please help me…
You have to reset the time, or basically have a scene before the scene you want and then restart to that scene and initialize everything.
Feyhu Thanks for the reply…
How to create the scene for the starting screen
and
How to reset the timer
Is there a reason why you are not instead using Time.timeSinceLevelLoad ?
Thank you very much Devans…
I got that with the help of Time.timeSinceLevelLoad…
Any way thanks again…
I made a game and i want to delete my game how do i do that?
I’m not sure how others do but I would smash my computer into pieces. That’s the best way to do every time I want to delete my game. That is also the fastest way to delete anything (not just games). However I’m not sure if anyone can do that. I’ve witnessed a guy banging his head against the wall after he tried deleting his game this way.
Witty responses are great and all but maybe don’t try them out by necroing a thread from 2010…
Actually it was @stewart1973 that necrod the thread. Funny reply that guy though.
just make a collider at the finish line and put a javascript on your car that says
Function OnCollisionEnter(col : Collision)
{
if(col.gameObject.name == "Finish")
{
Application.loadLevel(Level1);
}
}
just replace the level name and collider name and you should be done.