Hello,
I am somewhat new to scratch and need help with a script. My project involves timing users and recording their answer on questions that are supposed to confuse the brain like Blue text red. My project's time script goes when
green flag is clicked
reset timer
forever if timer is greater than 3.5
if timer is greater than 3.5
add 0 to answers
say try to be faster next time
add - to time
stop script
(end of loops)
Offline
Sorry accidentally hit enter here is the rest
when I end my quiz all of the scripts automatically go off so I have 5 minuses and zeros on my lists. Also if they miss a question in the middle all time scripts that have already started go off. I am using variables for the later questions time scripts.
Any help would be appreciated
Thanks
Offline
Don't suppose you could upload it?
Otherwise at first glance I see a few problems with your scripts, the biggest seems to be that it looks like you are time syncing the questions which is a bad idea.
I'd recommend asking the question in the same script as the timer bit is in and use broadcast and wait followed by reset timer to start the question.
Example using plain text questions instead of costumes (I know this isn't what you want but its just an example of how to get the timer to work right with it):
when gf clicked set [QuestionCounter v] to [0] repeat <length of [Questions v]> reset timer ask <item (QuestionCounter) of [Questions v]> and wait if <(timer) > [3.5]> wrong else if <(answer) = <item (QuestionCounter) of [Answers v]>> change [CorrectAnswers v] by [1] end end
Offline
when gf clicked reset timer forever if <(timer) > [3.5] > if <(timer) > [3.5] > add [0] to [answers v] say [try to be faster next time!] for (2) secs add [-] to [time v] stop script endhere is the script that I am currently using for my time if you want to see my question script also I can upload it. By the way do you mean using something that works off of the length of ___ block?
Offline
Uploading it would help me a lot I think, if you don't mind.
Also your script won't work because the reset timer block is never reset at the start of a question (unless this is done in question script in which case I definitely would like you to upload). Also remove the stop script block.
Offline