Mystery Number Scripts =========================================================== Card script global varMystery, varGuess, varTries on opencard show field "guess" show field "directions" show field "guesses" put random (100) into varMystery //turn the following line off (by turning it into a comment) //after you are sure everything is working put varMystery into message put 0 into varTries put varTries into line 2 of field "guesses" hide field "too high" hide field "too low" hide field "correct" hide button "Play Again" focus on card field "guess" end opencard =========================================================== "Guess" field script: global varMystery, varGuess, varTries on returninfield add 1 to varTries put varTries into line 2 of field "guesses" put line 1 of me into varGuess if varGuess > varMystery then show field "too high" end if if varGuess< varMystery then show field "too low" end if if varGuess = varMystery then hide field "guess" hide field "directions" hide field "guesses" if varTries>1 then put "You guessed "&varMystery&" in "&varTries&" guesses!" into line 1 of field "correct" end if if varTries=1 then put "You guessed "&varMystery&" in "&varTries&" guess!" into line 1 of field "correct" end if show field "correct" show button "Play Again" end if wait 1 second hide card field "too high" hide card field "too low" put empty into me end returninfield