3 Replies Latest reply on Oct 25, 2010 4:10 AM by srirama.83

    Need help with codes

    xXXxHeart2HeartxXXx

      I'm making a maze game in as2 and I came up with a problem here. I used this code:

      on(release){

      gotoAndPlay(3);

      }

       

      I used this code for the maze, and in this code the mouse takes control and if it touches the walls then it shows "Game Over".

      But I need some help here.

      I made a small human to move and it is actually draggable.

      So I want to move the draggable human around but the mouse is still in charge of it.

      Can anyone help me, please?

        • 1. Re: Need help with codes
          Ned Murphy Adobe Community Professional & MVP

          The code you show will have bothing to do with touching walls, displaying "Game Over", or dragging a small human around.  You haven't really identified a problem the way you describe it.  If the design doesn't do anything that you describe and that's what you want help with, try searching Google for AS2 game design tutorials.

          • 2. Re: Need help with codes
            xXXxHeart2HeartxXXx Level 1

            You haven't got my point. Let me explain it all over again, from the very beginning.

            I made four frames in this game, the first frame contains the starting part, which is "welcome" and a "play" button.

            The second frame contains the maze and it's quite a twisted one, and it also contains a draggable movieclip as well. It's separate.

            The third frame shows "game over"

            The fourth frame shows "you won"

             

            Now in the second frame, I used the code I've given above. It works well, here whe the mouse touches the wall it shows "game over". I made a draggable movieclip, coded it and it works well too. But I want that when the movieclip touches the wall, it shows "game over" and not when the mouse touches the wall. So in other words, I want the movieclip as the main body, and not the mouse cursor itself.

            • 3. Re: Need help with codes
              srirama.83

              Use hitTest