User Tag List

Results 1 to 3 of 3

Thread: Toggling flags based on multiple conditions...

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Dec 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Toggling flags based on multiple conditions...

    Hey, I'm working on a project that I've sort of resurrected from a few years ago. Trying to "select" and "deselect" an active object by toggling a flag.

    Whenever it's off and you click on it, it makes it selected, and whenever it's on and you click it's deselected. Easy with a basic toggle.

    But I want to make it so that it takes one away from a counter every time you make one selected, and once more than an arbitrary number have been selected, it refuses to select more until one's been deselected.

    User clicks with left mouse button on Object
    Counter > 0
    Object internal flag 0 is off

    -> set Object internal flag 0 on
    -> subtract one from Counter

    and then, the opposite -

    User clicks with left mouse button on Object
    Object internal flag 0 is on

    -> set Object internal flag 0 on
    -> add one to Counter

    It's not working. I remember running into this same flavor of problem back when I used MMF2 more often, and I don't remember running across any definitive solution.

    Project's attached. I'd be really grateful if someone'd be able to give some advice.

    traits.mfa

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a pretty easy fix, when you click on an object both events will fire at the same time, to fix this you need to prevent the second event from firing by either adding additional flags, or have some way of preventing until the mmf loops once.

    https://dl.dropbox.com/u/14962632/Public1/traits2.mfa

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the toggle flag action.

Similar Threads

  1. Help! - Multiple "Which animation is playing?" Conditions in same event line.
    By ezzypixel in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th October 2013, 02:18 AM
  2. Adding data to list based off multiple combinations of array variables?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 10th August 2013, 02:19 PM
  3. creating multiple objects based on value of a variable
    By infinitum3d in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 2nd March 2013, 02:52 AM
  4. Is there a way to have an event with multiple conditions?
    By randomdude90 in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 9th July 2012, 06:17 AM
  5. Global string multiple conditions
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 9th April 2010, 10:07 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
  •