home *** CD-ROM | disk | FTP | other *** search
/ Mind Games (Tessera) / MindGames.iso / mind_games / Files / quiz.dxr / Internal_3_AnswerScript.ls < prev    next >
Encoding:
Text File  |  2002-11-22  |  807 b   |  39 lines

  1. property myValue, Exec
  2. global TotalPoints, CorrectAnswer, QuestionAnswered, JokerPoints
  3.  
  4. on beginSprite
  5.   Exec = 1
  6. end
  7.  
  8. on mouseUp
  9.   if Exec then
  10.     if CorrectAnswer = myValue then
  11.       TotalPoints = TotalPoints + 20 + 20 - (the timer / 60) + JokerPoints
  12.       member("FPoints").text = string(TotalPoints)
  13.       QuestionAnswered = 1
  14.       if the soundEnabled then
  15.         puppetSound(3, "RightSound")
  16.       end if
  17.       sendAllSprites(#GoToNextQuestion)
  18.     else
  19.       if the soundEnabled then
  20.         puppetSound(3, "WrongSound")
  21.       end if
  22.       sendAllSprites(#GoToNextQuestion)
  23.     end if
  24.   end if
  25. end
  26.  
  27. on DontExecbtn
  28.   Exec = 0
  29. end
  30.  
  31. on Execbtn
  32.   Exec = 1
  33. end
  34.  
  35. on getPropertyDescriptionList
  36.   p_list = [#myValue: [#comment: "Wich is my value: ", #format: #integer, #default: 0]]
  37.   return p_list
  38. end
  39.