User Tag List

Results 1 to 6 of 6

Thread: Simple Workaround?

  1. #1
    No Products Registered

    Join Date
    Oct 2008
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple Workaround?

    I haven't been to these forums in ages! Wow.

    Anyways, I'm wondering how to fix an issue. I'll describe it in as general of terms as I can.

    Say you have these events,

    "If you press Z while M=0, then do X, and set M to 1."
    "If you press Z while M=1, then do Y, and set M back to 0."

    Seemed simple to me, but I've come across an issue. My guess is that MMF2 runs this too fast, and when you press Z nothing happens because it goes through both events so quickly. I've had this issue before, but it's been so long that I can't remember how I worked around it. How do you guys do this?

    Sorry for my bad memory.

  2. #2
    mojofltr
    Guest

    Re: Simple Workaround?

    There are probably many ways, but I would add a flag into the mix:

    Code:
    Upon pressing "Z"
    Alterable Value M=0
    Internal Flag 0 is off
    	Do X
    	Set Alterable Value M to 1
    	Set internal flag 0 on
    
    Upon pressing "Z"
    Alterable Value M=1
    Internal Flag 0 is off
    	Do Y
    	Set Alterable Value M to 0
    	Set internal flag 0 on
    
    (DO NOT) Repeat while "Z" is pressed
    	Set internal flag 0 off

  3. #3
    No Products Registered

    Join Date
    Oct 2008
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple Workaround?

    Hmm... that didn't seem to work. I tried using the flag only (the variable's only there to determine what the button does), and using a flag and the variable, and got no results with either of them. :/ Any suggestions?

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple Workaround?

    You've run into the trap that many others have run into.
    See the first two posts here:
    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=176557

    The issue is not that the events run too fast, but that both events run within the same frame.
    Working as fast as I can on Fusion 3

  5. #5
    mojofltr
    Guest

    Re: Simple Workaround?

    I'm not exactly sure what you're trying to perform... so this may or may not suit your program:

    http://mfa.aquadasoft.com/upload/1312938602-Hi.mfa

    The first frame is identical to the code I posted above. Since you said you didn't really need the alterable value, I added a second frame that uses a single flag to perform the same thing. It would work without the "only one action when event loops" conditions, but I put that in there so that pushing the "z" button results in only one action each time. (In this example, it wouldn't really matter - there would be no difference to continually set the active object to invisible. However, if you were wanting to, say, add 500 to a value... then without the "only one action when event loops" condition, it would continue to add 500 as long as the flag was set.)

    Okay, I hope that made sense.

  6. #6
    No Products Registered

    Join Date
    Oct 2008
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Simple Workaround?

    Yay! I figured that it was common because it's so simple, but your posts and example helped me remedy it. Thank you LB! It is much appreciated.

    Edit: Didn't see that you posted mojofltr. It's all solved now, but thank you for your help as well.

Similar Threads

  1. SWF as a workaround for Mac users?
    By Strife in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 9th January 2013, 12:31 AM
  2. Non-Unicode Workaround
    By Ham in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 2nd March 2010, 11:01 PM
  3. Pinball movement workaround?
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 15th December 2008, 06:11 PM
  4. workaround for quiz object bug
    By therickman in forum File Archive
    Replies: 1
    Last Post: 20th March 2008, 09:50 AM
  5. Sub-pixel workaround?
    By Nifflas in forum Hardware Accelerated Runtime
    Replies: 9
    Last Post: 1st February 2008, 07:03 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
  •