3 Replies Latest reply on Jun 18, 2009 3:19 AM by xXNorakuXx

    Complicated script

    xXNorakuXx

      Hey everyone,

      I am looking for a script to do work on my IT assignment. Well, a few really, I have been scouring the net for 3 weeks and have found quite a bit, but I can't find what I want,  as it is more complicated than most would ask for...I want a good mark.

      OK, so it is a Drag and drop styled game, but I went for a different approach, I am making an archery, where you drag arrows and fire them at the targets, there is also a score screen after play where the person has to add up their score, and it tells them if it is wrong.

      I wanted, mainly to know how to make it so that:
      You can't shoot the targets unless you have an arrow dragged back.

      The targets move across the screen, although I think I may be able to do that myself.

      And definitly I need to know how to do that score bit, how you make it so that the game knows how much they got, and they have to enter it in, if they get it wrong then it tells them...

      Also I have added a variable to say how many shots they have missed and how many they have hit. I have the hit set up, though it doesn't work...

      It comes up with "NaN" instead of the number...I will post the action script used:
      on(press){

      gotoAndPlay(2);

      _root.score++;

      }

       

      The script is inside the target itself as I added "dummy points" which are the points the arrrows hit...

      score is the variable I put on the dynamic text for hits, I have adjusted the font size and everything to what I want and made sure that I can see the text (so it is not white ).

      Can anyone help?

      I have been looking for awhile but havn't found something as specific as I want, although I have been mixing and matching tutorials to get things worknig so far, this may be why it isn't working...I don't know flash all that well..

      Thanks,
      Without wax,
      Norak.

        • 1. Re: Complicated script
          Ned Murphy Adobe Community Professional & MVP

          You are not likely to find something as specific as you want.  What you need to do is to focus on getting one aspect of interaction working at a time.  If you post here with details on your design and the code that isn't working for you, you are more likely to get some meaningful help... I doubt anyone is going to write that script that you can't find... though some do get overly generous here at times.  A deserved good grade should involve a little more effort than finding and using someone else's solution.

          • 2. Re: Complicated script
            xXNorakuXx Level 1

            Sorry, I didn't mean it the way it sounded...

            I wanted (/want ) to know if anyone could help me find out how to do it.. As I was talking about how I couldn't find it, I wanted to know if anyone had any good tutorials or websites, as I have searched my little heart out..

            So, if anyone can help me in any way that would be great!

            • 3. Re: Complicated script
              xXNorakuXx Level 1

              OK, I have found a few things from this one website...It is taking a lot of tweaking, though I am thinking I can get most of it working....

              I just need to know a few things:

              How I can fix the NaN problem I have having, instead of it adding to the value with the variable.

              How I can implement the score counting/player count it/ tells player if it is wrong. (This seems hardest)

              I also would like to know how to make it so that when I drag an arrow I want it to turn 180 degrees so it is facing the right way...Would I just make it so that

              startDrag(this);

              if (this._Drag){

                 this._rotate = 180;

              }

              ?

              I need to make it a drag and drop, what I was planning was dragging the arrows, but how do i make it so that you can only hit the targets with the arrows?

              Thet targets are invisible for some reason. (If you download you will see 2 small circles on the side, these are the targets they can't be seen becuase I deleted the first frame, but they are supposed to become visible again...

              Also, now after trying to fix it, the target is completely red, it seems the dummy point I made are red and they won't change...

              OK this is the tut I used:
              http://www.layoutgalaxy.com/html/htmnewletter47-page4.htm
              and I will upload what I have so far in a minute, it is due in 2-3 days so I hope someone can help...

              Thanks..Norak.