User Tag List

Results 1 to 10 of 10

Thread: How do you stop a sequence of events happening at once?

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2007
    Location
    UK
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do you stop a sequence of events happening at once?

    Silly noob question but how do I stop a sequence of events from happening all at once?

    I've got a simple active with different animation frames (but speed set to 0). I'm trying to change the animation frame of the object each time I press the same key but it skips straight to the end frame (having run through all other frames presumably, because I pressed the key, but too quick to notice). I need it to display each animation frame in sequence when I press the same key. I've tried flags, alt values, counters, activating and deactivating groups... using any of those methods skip to the last animation frame because MMF2 is taking that one press of the key at the start and running all the events one after the other instead of waiting for me to press the key again.

    I realise this is probably event building lesson 101 but I've never had to implement something like this before so I don't know how to resolve it.

  2. #2
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2007
    Location
    UK
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone????

  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleInstall Creator ProUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    574
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    If your event is upon pressing a button and not repeat while pressing a button it should only increment the frame by one. But IIRC there was a bug in MMF 2.0 which caused the animation to play even with the animation speed set to 0. Maybe try setting the animation speed to something other than 0. Then add an event that at start of level stop animation and set frame to 0. See if that helps.

    You could also try the following events:
    always
    - set animation frame to alterable value A of object
    if alterable value a of object > number of animation frames
    - set to alterable value of object to 0.
    when pressing a button
    - add 1 to alterable value of object.

  4. #4
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2007
    Location
    UK
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just tried that and it still skips straight to the end. Here's the code, dirty and simple. Player presses Fire and a box appears, when the player presses down it should change the animation frame to 1 (i.e Frame 2).
    When the player presses down again it should change the frame to 2 and so on. Instead it jumps straight to the last frame of the animation.

    This happens if the speed is either set to 0 or set to 1 with a stop command and force frame to 0 at the start.



    "Text" is an alterable value on the box object.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Dec 2008
    Location
    Italy
    Posts
    404
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Are you looking for something like this? (see attachment)
    No need to set speed=0, but you must have an event "Always > Stop Animation"
    Attached files Attached files

  6. #6
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2007
    Location
    UK
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can't open that .mfa, if you made that in Fusion 2.5 that's why.

    I put an always stop animation event for the box object but it sill passes straight to the last frame when I press down (S key). Basically after the 358 event the next to happen is 361 ignoring 359 and 360.

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Dec 2008
    Location
    Italy
    Posts
    404
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Here's the code:
    code.png

    The Active object is just an Active with 5 frames, no loop/repeat.
    code_2_rev.jpg

    It works for me, going to each frame of the Active object when I press spacebar, without skipping to the end.
    If that doesn't work, there's probably a difference on how MMF2 works in comparison to F2.5.

  8. #8
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2007
    Location
    UK
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh awesome, thanks faber. That works beautifully! It forms part of a very simple dialogue system using actives instead of arrays, ini's or text blitters.

    However I do have text blitters for my inventory system, based on Phizzy's code. Can you take a look at my other post further down (Spud's Quest inventory system) ?
    I've got it every working with the font in the standard ascii image but I made my own font bank using 2x2 pixels based on the Deluxe Paint IV font on the Amiga. Thanks.

  9. #9
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Soopytwist, events 358, 359, 360, and 361 are all executing. It just so happens that they all activate immediately after one another.

    For example;

    • Suppose the Event Editor is at line 358, Text = 1, and you press 'Down'. The event executes and changes Text to 2.
    • Now Text = 2 and 'Down' is still pressed so line 359 activates
    • Now Text = 3 and 'Down' is still pressed so line 360 activates
    • Now Text = 4 and 'Down' is still pressed so line 361 activates


    As you can see, triggering the first event triggers the second event which triggers the third event, and so forth.


    You can easily resolve this one of two ways:
    • Do what faber says and make the transition occur in one event instead of multiple
    • Add an extra condition to the events such that if one of them executes, the rest do not execute.



    Example:

    + Text = 1
    + Down is pressed
    + triggered = 0
    - Set Text to 2
    - Set triggered to 1

    + Text = 2
    + Down is pressed
    + triggered = 0
    - Set Text to 3
    - Set triggered to 1

    etc...

  10. #10
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2007
    Location
    UK
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good to know ProdigyX, I'll make a note of that. faber's suggestion works a treat.

Similar Threads

  1. Sounds stop playing / touch screen stop working
    By willy in forum iOS Export Module 2.5
    Replies: 6
    Last Post: 18th September 2014, 04:44 PM
  2. WHY Is this happening?
    By UnicornMan in forum iOS Export Module 2.5
    Replies: 8
    Last Post: 14th April 2014, 12:16 PM
  3. [BUG] Objects stop moving, events stop working in Flash build only.
    By N64Mario in forum Flash Export Module 2.5
    Replies: 5
    Last Post: 13th March 2014, 06:42 AM
  4. Having events not happening?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th April 2012, 12:13 PM
  5. What would make overlap events stop working?
    By JohnC in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 20th October 2010, 07: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
  •