User Tag List

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

Thread: One Action when event loops

  1. #1
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    One Action when event loops

    Hello,

    I got an object with 7 alterable values. Each value named by it's number (Alterable Value is named "A1", Value 2 is named "A2" etc).
    Each of these Alterable Values are used for the movement of the player. Now I'm trying to make something happen when the Player stops moving so I did:

    Code:
    A1 of ("Active")= 0
    +A2 of ("Active") = 0
    +A3 of ("Active") = 0
    +A4 of ("Active") = 0
    +A5 of ("Active") = 0
    +A6 of ("Active") = 0
    +A7 of ("Active") = 0
    And I did the action I wanted it to (for example purposes, I made it play a sound.)
    But the thing was the sound keeps playing because while the player is stopped all these values will always equal to 0. So the sound kept playing unless I moved the character.

    This is the problem: At the end of all this I add a "Only one action when event loops" so the sound would only play once every time the player stopped moving.
    Code:
    A1 of ("Active")= 0
    +A2 of ("Active") = 0
    +A3 of ("Active") = 0
    +A4 of ("Active") = 0
    +A5 of ("Active") = 0
    +A6 of ("Active") = 0
    +A7 of ("Active") = 0
    + Only One Action When Event Loops
    Nor for some reason the sound plays when I stop the first time, but when I walk around and stop it never plays. The sound only plays once in the entire application. It's as if I added the "Run this event Once" but I didn't.
    What's wrong?

    Thanks!


  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: One Action when event loops

    Make sure all of your alterable values are equal to 0. Use counters to see if they are all 0 when you are not moving. Also try moving the "only once when event loops" to the top of the event.

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  3. #3
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: One Action when event loops

    They are all 0....I've already checked that (I set the object into the debugger).

    And moving the "Only one action when event loops" to the top doesn't do anything.

  4. #4
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: One Action when event loops

    That's strange, it should work. Maybe the problem is that when you start walking again, it doesnt change any of the values, so therefore it is still infact testing true to all values. Otherwise maybe you can toggle a flag instead.

    A1 of ("Active")= 0
    +A2 of ("Active") = 0
    +A3 of ("Active") = 0
    +A4 of ("Active") = 0
    +A5 of ("Active") = 0
    +A6 of ("Active") = 0
    +A7 of ("Active") = 0
    - Set flag 0 of 'Active' to ON

    A1 of ("Active")= 0
    OR
    +A2 of ("Active") = 0
    OR
    +A3 of ("Active") = 0
    OR
    +A4 of ("Active") = 0
    OR
    +A5 of ("Active") = 0
    OR
    +A6 of ("Active") = 0
    OR
    +A7 of ("Active") = 0
    - Set flag 0 of 'Active' to OFF

    Flag 0 of 'Active' is ON
    + Only one action while event loops
    - Do event

  5. #5
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: One Action when event loops

    Nothing works! I tried all that but the sound keeps playing like a million times over and over again.

    It's cause some of the values are 1 or 0.

    Alt Val 1,3,5 and 7 could be 1 but 2,4 and 6 are 0. They keep changing from 0 to 1 because of the movement engine. The only time when they're all 0 is when the player has stopped.

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: One Action when event loops

    Post your MFA file.

  7. #7
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: One Action when event loops

    I can only send it to 1 trusted person... It's for a very big project (Knytt Online). I won't release the source code to the public yet.

  8. #8
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: One Action when event loops

    ..isolate the problem and post that instead?

  9. #9
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: One Action when event loops

    I'll have to find my own way out of this problem.

  10. #10
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: One Action when event loops

    It must be a problem in your code somewhere then, as you seem to be hitting the problem with various approaches.

    But yes, try to isolate it because if it is a bug I am sure Yves would want to fix it. That would also helo you narrow it down to what the cause is

Page 1 of 2 1 2 LastLast

Similar Threads

  1. "Only one action when event loops" question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 5th December 2011, 02:49 PM
  2. only one action when event loops
    By therickman in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 17th October 2008, 01:24 AM
  3. Two loops controlling 1 event.
    By BrandonC in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st January 2008, 10:37 AM
  4. Fastloop + Only one action when event loops
    By Sphax in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 12th August 2006, 08:20 PM
  5. The 'Only one action when event loops'...
    By Tiny in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 25th July 2006, 03:26 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
  •