1 Reply Latest reply on May 19, 2006 4:50 PM by Newsgroup_User

    True Or False Game

      Hi all

      A total newbie to director and need some help as i'm really stuck,

      For part of my college work I am trying doing a True or False game based on 10 questions but unsure how to script this, what game involves is when a question has been answered correctly the user is sent to a marker named "Right", showing an animation telling them they have answered it correctly, if they have answered the question incorrectly they get sent to another marker named "Wrong" again showing an animation telling them they have answered incorrectly.

      The way I have decided to do this is by importing the questions from text file that hold 10 question, the current script i have for Director to load the questions is.....

      on mouseUp me

      but wanting to randomize them.

      I also have 2 buttons named True and False, and because 5 questions are true and 5 are false, the only code i have so far in different scripts is

      on startMovie

      on Answer
      global gQuestions
      gQuestions = True

      global gQuestions
      on mouseUp me
      if gQuestions = True then
      go to "Right"
      go to "Wrong"
      end if

      and dont know what code i needs to be added to determine which correct answer goes to the correct marker

      Thanks ifor any help in advance

        • 1. Re: True Or False Game
          Level 7
          Consider the low tech aproach.

          If you don't have a big library of questions that have to be imported
          dynamically, I would suggest going with a less programatic intensive
          approach, in which each question is contained in a predefined text
          member displayed in a separate score marker.

          Again the simplest least programatic approach would have the actions for
          the True False answer buttons assigned separately for each individual
          question, that is in question number 3 you might have the True button go
          to the wrong marker.

          You could avoid writing any lingo code by using the navigate to marker
          behavior from the library palette to access a marker from a series you
          already have setup in the score.

          A hard coded series of markers might look like:


          They would all show up in the parameter popup menu in the behavior.

          A score script at the start of the right wrong markers could increment
          the global question tally

          on exitFrame
          global rightCount, totalCount
          totalCount = totalCount + 1
          rightCount = rightCount + 1 -- this line is only in the righ marker