1 Reply Latest reply on Sep 24, 2010 9:50 PM by kapelski

    SlotMachine / Match Game Scoring

    kapelski Level 1

      Hi All,

       

      I wanted to thank everyone that helped out with the last set of questions I had.  I hope everyone received their points for helping!

       

      I am working on a game that is set up like a slot machine.  The first box contains a name, the second box cotains a piece of information about the person and the third box contains another piece of info. Each box has a movie clip in it that contains 10 frames, each frame has text in it (a name or piece of information).  There are up and down arrows above the second and third box as the user can control what piece of info is in that box using the arrows (if the user clicks the up arrow they go up 1 fram to different info....if down down a frame to new info.)  The first box is not user controled, it has a button that randomly generates the name the player is given with a spin animation.

       

      Now here comes the part where i need help, BADLY.

       

      The goal of the game is to match all three boxes the random name with the 2 user controlled pieces of info.  If this happens I want the player to receive 20 points.  However, if the player only matches one of the pieces of info to the random name then they should only get 10 points.  If they do not match ny pieces then no points are awarded.

       

      I figured the best way to do this would be to give the corresponding correct answers and names matching variable names and set it so if you have 2 matching variables you get 10 points and if you have 3 matching variables you get 20 points (no points awarded for 1 variable because 1 variable alone would be the name). My problem is that I dont know how to assign a frame a variable number and I also dont know if its even possible to do something like this.  Am I on the right track or is there a much better way to set up scoring?  Any feedback would be appreciated greatly and thanks in advance!

       

      Kapelskic

       

      ALL CODE IS AS2 BY THE WAY!

        • 1. Re: SlotMachine / Match Game Scoring
          kapelski Level 1

          Here is the code I was atempting to get above project to work with.  This code was placed on the spin button (the button that randomly selects a name for the first box).

           

          on  (press) {
          _root.spinclick.gotoAndStop(1);
          gotoAndStop(1);


                if (_root.slot1._currentframe == _root.slot2._currentframe) {
                   _root.score = _root.score+10;
                }
                if (_root.slot1._currentframe == _root.slot3._currentframe) {
                   _root.score = _root.score+10;
             }