Setting an infinite time
DaveGWelsh
Member Posts: 60
Hi,
I'm in a bit of a pickle. I'm trying to setup a scene whereby the user can set how long they play for. However, I want one of the options to be infinite i.e. if they select this, then the game wouldn't 'end', as it were. Also, if they simply jumped into the game without attempting to set a time, then the default would be to infinite.
So, any suggestions/help for setting an infinite time would be greatly appreciated!
Thanks in advance.
I'm in a bit of a pickle. I'm trying to setup a scene whereby the user can set how long they play for. However, I want one of the options to be infinite i.e. if they select this, then the game wouldn't 'end', as it were. Also, if they simply jumped into the game without attempting to set a time, then the default would be to infinite.
So, any suggestions/help for setting an infinite time would be greatly appreciated!
Thanks in advance.
Comments
I want to allow the user to set a number of set time pieces ; infinite, 2 minutes etc. I have the 2 minutes working but how do you get an infinite timer setup?
Thanks in advance!
2 Minutes- Set timer to 120 (60*2)
5 Minutes- Set timer to 300 (60*5)
Infinite- Dont use a timer
When time = 0 change scene finish.
or simply remove the every .1 seconds remove .1 second from the timer for infinite.
Need Help? Email Me | Templates | Full Game Source Code
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
It runs like this. The user can select infinite, 2, 5 or 10 minutes of play. I've got the 2, 5 and 10 working now but not sure how to get the infinite working. SO basically, if the user selects infinite (which is default) the game would never stop.
But as @bjandthekatz stated, if you want an infinitely long game then you don't need a timer at all. By definition, every single game on the app store is "infinitely long" until you die/lose, unless that game has some sort of timer counting down.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Your solution in the other thread worked perfectly! The problem is though I have this logic.
I set up a boolean check to see if the user has selected a time. if they do, it sets this to 'True'. Within this rule is the timer i.e when TimerActive = TimeSelected (600 seconds for example) do this (which is load another scene).
This works fine for infinite (which sets the Timer to False), 2 and five but its the 10 minutes that just seems to cause it to fail.
So, I pulled the timer out of the rule and it works fine but this means that the game doesn't run when set to infinite.
Urgh
Thanks so much for your help though, it's much appreciated!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I just deleted it and re-did it from scratch and now it seems to work!
Weird/crazy.
however, thanks again though, your help was awesome!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
You know I get easily confused if you don't put 'sin' or 'cos' in your posts.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User