Question about scoring in games.
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Question about scoring in games.

  1. #1
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,092

    Cool

    Im working on a simple game that has 8 targets.

    Each time a target has been hit a score of 1 is added to a total score.

    Any ideas?

    I thought about creating a MC
    and using Tell Target.


    I would like to here some ideas or possibilites.

    Thank you for your time.
    Regards...

    Jeff aka jydnas: Sounds and Music Moderator.


  2. #2
    Member
    Join Date
    Feb 2000
    Posts
    62

    Cool


    Hi Jeff,

    There are several ways you can do this depending upon the type of targets and game you have.

    1) If the targets are non-animated and you shoot them by clicking the mouse cursor on them, you can modify the properties of your "targets" and change their behavior to "button". Then you can use the "on press" mouse action to say Set Variable: "score" = score+1 - This is how my game "coco-shoot" works, which you'll find in the FLA section on this site.

    2) If your "targets" are animated movie clips then it's better to create a transparent draggable movie clip, which follows the mouse. When you click the mouse button, you then get the x,y co-ordinates of this draggable movie clip and compare it with the x,y co-ordinates of your targets - compare the 2 sets of co-ordinates and then calculate if you've hit a target. If you have then set score=score+1 - this is similar to my "pong" game, which is also in the download section.

    3) If you're shooting bullets at targets on this screen. Then you have to setup a loop...while statement and compare the co-ordinates of the bullets with your targets to see if they have collided.


    Hope this helps. Let me know if you need further explanation or ideas.

    JR

  3. #3
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881

    Post

    basically every time the target is hit
    do set variable /:totalscore = totoalscore + 1 or whatever points u want to give them for hitting a target

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com