0 Replies Latest reply on Mar 24, 2014 5:41 PM by NlGMA

    Director Lingo - If Statement Problem

    NlGMA

      I am trying to get my code to check on keydown if the "Hand" has moved yet and if so then reset it to the original position, reset the x value, increase the global score and speed. However if it hasn't moved yet, then it jumps to the Game Over screen. The issue I am having is that when it resets the Hand location, it the executes the "if Hand.locH = -720 then go to "Game Over""part of the code and goes to the Game Over screen. Or at least that is my best guess.

       

      Any hints as to what the issue is would be greatly appreciated. Thank you!

       

       

      on KeyDown me
        if Hand.locH = -720 then go to "Game Over"
        else if if Hand.locH > -720 then
          Hand.locH = -720
          global gScore
          gScore = gScore + 1
          x = 0
          if gSpeed > 50 then
            gSpeed = 50 + random(-10, 10)
          else
            gSpeed = gSpeed + random(3)
          end if
        end if
      end