User Tag List

Results 1 to 3 of 3

Thread: 2 player scoring selection

  1. #1
    No Products Registered

    Join Date
    Aug 2009
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    2 player scoring selection

    I'm trying to create a pong game where the ball can destroy floating objects. The problem I'm having is how to score it for 2 players. If the ball bounces of player 1's paddle and hits an object I'd like to get the points to player 1. If the ball bounces of player 2's paddle and hits an object I'd like to get the points to player 2. I've been trying to do two things that have not worked yet....track the direction of the ball if it is moving to the right it could score for player 1, if the ball is moving to the left it would score for player 2. That is the first method I tried. The 2nd method was to try to connect the score to whatever paddle the ball hit last...if it just bounced off of player 1's paddle it would score for player 1 until it hit player 2's paddle and then the ball would score for player 2 any time it hit a floating object until the ball hit player's 1 paddle, etc. Any ideas would be appreciated. Thanks in advanced.

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: 2 player scoring selection

    Your second idea (connecting the points to the last paddle hit) is very easy. When the ball hits a paddle, set a flag on the ball. If player 1 hits the ball, set the ball flag to ON. If player 2 hits the ball set the ball flag to OFF. Or you could use the toggle flag command.

    Then when your ball hits an object that scores points, you have 2 conditions:

    -If ball collides with object
    +Ball Flag is ON
    -->add points to player 1

    -If ball collides with object
    +Ball Flag is OFF
    -->add points to player 2

    Hope that helps,

    Mobichan

  3. #3
    No Products Registered

    Join Date
    Aug 2009
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 2 player scoring selection

    Mobichan,
    Thanks a bunch...that was much easier than anything I was trying to do and it works great. I appreciate your help.

Similar Threads

  1. GF2 not scoring
    By mojoz in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 6th April 2011, 05:30 PM
  2. Scoring
    By toastface5 in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 11th November 2009, 08:50 PM
  3. How do I get the scoring to work?
    By RickyRombo in forum File Archive
    Replies: 5
    Last Post: 30th April 2009, 01:45 AM
  4. Player Selection Example for Marioman
    By Eliyahu in forum File Archive
    Replies: 0
    Last Post: 16th April 2009, 10:31 PM
  5. Scoring
    By jrk in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 30th July 2006, 10:33 AM

Posting Permissions

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