User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Object overlaps square = add 1 to counter help?

  1. #1
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    715
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Object overlaps square = add 1 to counter help?

    Hey Clickteam,

    I'm wracking my brain on this one and need help! I'm making a mini shuffle board type game where the player throws a puck that can slide on three different squares. The closest square to the player is worth 1 point, the second square 5, and the last square is worth 10. I created an event when the puck is overlapping the first square, which is worth 1 point, I add one to the Players score counter. But this like it should, continuously adds 1 to the counter since the puck stays on the square. I want it to only add once to the counter the value of which point square the puck lands on. How can I do this? Thanks Clickers and Merry 12 days of Christmas!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unless I've misunderstood the problem, you could use flags to limit this. For example:

    + Puck is overlapping square
    + Square Flag 1 is off
    - Add Score
    - Turn Square Flag 1 On

  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    715
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hey thanks Chrille. Haha. I hope it's not that simple cause my Clickteam street cred will go way down. I'll try it and post!

  4. #4
    Clicker Fusion 2.5Android Export ModuleSWF Export Module
    Ziplock's Avatar
    Join Date
    Oct 2013
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure - that should work. You could also "Run this event only once."

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    715
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hey Ziplock,

    The player gets 4 throws. I was creating the same puck for every throw so when I tried "run this event only once," it would work on the first puck throw but not on the other three. Now that I'm typing this out, I might just create 4 different active pucks for each throw.

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "Now that I'm typing this out, I might just create 4 different active pucks for each throw. "
    This sounds overly unessesary.

    Chrille suggestion should work
    if your creating 4 different Active Pucks, your more or less quadrupeling any code for the Puck, but it does work though

  7. #7
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    715
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Darn King_Cool,

    I spent about an hour copying code for the four different pucks. Lol. It does seem unnecessary. It is fun to experiment and figure out the best way. I now know what I need to do. I wasn't resetting the flag back off after the first puck throw. So the second puck throw wouldn't add the score. That's why I ended up creating four different actives. It was late... Thank y'all for the help!

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You shouldnt need to reset the Flag for any new Pucks, as the default value for Flags are OFF, so it is allready OFF when you created and ready to score another point.

  9. #9
    Clicker Fusion 2.5 (Steam)Android Export Module (Steam)

    Join Date
    Dec 2015
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you need to use the " one action when event loops" condition

    unlike the run event only once it will allow run the event the next time the puck lands wherever

    limit conditions > one action when event loops

  10. #10
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    715
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Great.

    Last night when I tried shooting another puck, it didn't add the score. I'm going to check it out tonight. Its probably something I missed. I'll update! Also, that was another question I wanted to ask. If flags are by default off. Thanks King_Cool.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 12th May 2015, 12:30 AM
  2. Only show part of object that overlaps another
    By Ryzla in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th December 2013, 07:03 PM
  3. Line overlaps and object?
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 23rd June 2009, 02:41 AM
  4. Clicking only 1 object while overlaps happen?
    By pulp in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 9th July 2008, 07:15 PM
  5. Blocking Overlaps with an Object
    By Dines in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 27th April 2007, 05:04 PM

Posting Permissions

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