So I'm doing a game for my ICT class and it's basically a simple colour guessing one... except, if answer the question wrong, it just keeps going around to answering it again. I was wondering what script I would put in to make it change to the "GAME OVER" screen I made if the answer was wrong five times in a row? I tried putting in the "if" answer "does not equal" but I'm stuck for the rest.
If nobody knows that, how do I put a timer on each question to make it "GAME OVER" if it's not answered in ten seconds?
Arigatou!~
Offline
when gf clicked if <not <(answer) = [correctanswer]>> broadcast [gameover v] endThen make a Game Over sprite that says "Game Over". Put 2 scripts in it saying
When gf clicked hide
When I receive [gameover v] show go to front stop allBTW: Are you in Brisbane School of Distance Education?
Last edited by jji7skyline (2012-03-06 01:47:58)
Offline
Use:
when gf clicked set [wrong_in_a_row v] to (1) set [question# v] to (1) repeat until < (length of [questions v]) = (0) > set [question# v] to (pick random (1) to (length of [questions v]) ) reset timer ask (item (question#) of [questions v]) and wait if <(timer) > (10) > say [Sorry, you took too long.] for (2) secs change [wrong_in_a_row v] by (1) else if < (answer) = (item (question#) of [answers v] ) > say [Correct!] for (2) secs delete (question#) of [questions v] delete (question#) of [answers v] set [wrong_in_a_row v] to (0) else say [Incorrect.] for (2) secs change [wrong_in_a_row v] by (1) end end if <(wrong_in_a_row) = (5)> say [Sorry, you've answered 5 questions incorrectly in a row!] for (2) secs broadcast [gameover v] end end broadcast [gameover v]In the sprite with the game over screen, use this:
when gf clicked hide when I receive [gameover v] switch to costume [gameover v]
Last edited by trinary (2012-03-06 02:25:33)
Offline