Very simple I'm sure.. But what is the smallest...
SaveDave
Member Posts: 140
increment of tine that I can get a reading from in gamesalad?
Does this have to be done with a timer or can a smaller increment be measured with an integer?
Thanks
Does this have to be done with a timer or can a smaller increment be measured with an integer?
Thanks
Comments
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
New real Game Attribute called Timer. New integer Game Attribute called UserCount
Have a start button for the sequence. Include in the Rules of that actor an integer Attribute called Counter. Each time one of the sequence is played, Change Attribute Counter To Counter+1.
Your Rules for playing the sequence. add Rule: if Attribute Counter = 5 (for instance, if there are 5 parts to your sequence, say) then
Timer: Every 0.1 seconds Change Attribute game.Timer to game.Timer+0.1 (i.e start timer just after sequence is shown)
A Rule, if UserCount = 0 then Change Attribute game.Timer to 0
In all of the sequence buttons, needs to be Rule When touch is pressed, Change Attribute game.UserCount To UserCount+1
When UserCount=5 (for a 5 sequence) then
When game.Timer > 3.25
Change Attribute game.Timer To 0 (resets the timer just after the user has pressed the last one in the sequence)
Display Text You Lost
Otherwise
Display Text You won
This is just the timer bit of course, which would work whether or not the sequence pressed by the user was correct. But then I'm guessing you've already done the stuff for the correct sequence "detection".
It probably needs refining/amending though, but I hope there's enough here for you to experiment with and get it up and running.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
After
Your Rules for playing the sequence. add Rule: if Attribute Counter = 5 (for instance, if there are 5 parts to your sequence, say) then
put
Change Attribute Counter=0
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
So is it possible to display the global game timer as text??
That'd be no problem; another attribute, boolean, when true, (true when timer starts), another actor to use behaviour Display Text; text to display: game.Timer. Think that should work.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Event1
FirstTime = game.time
event2
SecondTime = game.time
Delay:
SecondTime - FirstTime
What's the best way to time 0.01 second for a press of an actor appearing on screen???
Can you time smaller that that even?
Ie. 0.005
Make game real attribute called Timer (OK, call it Time to avoid confusion with the behaviour called Timer)
When touch is pressed
Timer behaviour
Every 0.01 secs
Change Attribute Time to game.Time+0.01
Hope that makes it a bit clearer for you. :-) (I didn't lay out the first explanation very well for clarity, sorry about that!)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I need to be able to read times of less than 0.01
In 0.03 second it shows times of three digits as milliseconds..
This is what I really need.
Is this a possibility?
Perhaps try with 0.01 seconds and see how responsive it is. I'm guessing you'll find it more than OK...
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
http://gamesalad.com/game/play/82566
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps