User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16

Thread: specific animation has played a specific frame?

  1. #11
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: specific animation has played a specific frame?

    If I might ask, where do you feel I am using loops that are not necessary? Every time I use them, it is solely for the sake of giving objects unique ID's. If MMF2 handled objects uniquely, I probably wouldn't use fastloops at all.

    EDIT: Here is a stripped version... stripped file
    Use LEFT mouse button to spawn the enemy in question.

  2. #12
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: specific animation has played a specific frame

    Okay I've modified your file and posted it. I've put red comments everywhere I've changed something:
    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=download&Number=2654

    Maybe there is another way to achieve the desired result, but this is how I would do it.
    First make the shooting animation to loop indefinitely with a loop back to the last frame. This is done in the Animation Editor.
    Then instead of testing for "Animation Shooting is over" since the animation now won't stop anymore, test if "Animation Shooting is playing" and if "Current frame == 4".
    Finally your actions remain the same, I've just added the 2 actions below to make the Shooting animation repeat:
    Code:
    - Ghoul: Force animation frame to 0
    - Ghoul: Restore animation frame
    The first action is pretty self explanatory, and the second one makes the animation play again with the speed set in the animation. Without the last action the animation would keep displaying frame 0.


    About the loops. You shouldn't spread values and launch loops within the same event as this could lead to problems. I've also replaced all the "On loop" events by the same events without the loops as they are not needed.
    In your case you don't need loops because you don't compare general values but you directly test for object values, so MMF does the object selection correctly.

    Hope it helps!

  3. #13
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: specific animation has played a specific frame

    That is both awesome and worrying. I was under the impression that fastloops were necessary (from advice from others in the forum). And I was also under the impression that a spread value needed a fastloop. This is truly enlightening.

    I understand everything in your example except one thing. You made frame 4 the frame that activates the next animation (turn around and fly away). I really want the last frame (frame 5) to play every time the bullet is spawned, but this looping method cuts off the final frame. I tried moving the force frame/restore actions to a new line under a "frame = 5" condition, but it seems to not work. Is it possible to force a frame once you are caught in a single frame loop (ie, once it reaches frame 5)?

    Thanks for all the guidance,

    Mobichan

  4. #14
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: specific animation has played a specific frame

    You shouldn't worry because grasping all the ins and outs of MMF can take some time. And this forum is your best ressource to grasp it all!

    For some reason the frame numbers are 1-based in the Animation Editor, and 0-based in the Event Editor. So the last frame of your shooting animation is actually #4.
    To solve your problem just duplicate the last frame of the shooting animation (now you have 6 frames) and test for "Current frame == 5" in the Event Editor. And don't forget to make the anim loop back to the last frame, referenced as #6 in the Animation Editor.

    About the understanding of object selection I will quote Joshtek:
    Quote Originally Posted by Joshtek
    As far as object-picking is concerned, objects don't get picked by being referenced to in expressions en passim. They only get selected by meeting their own object conditions.
    And some other interesting readings:
    MMF Runtime, Object Selection and Fastloops
    Getting the Most of..

  5. #15
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: specific animation has played a specific frame

    Oliver: Thanks for the heads up on the base-1 discrepancy. I read about that somewhere, but totally forgot when tinkering with this animation yesterday.

    I'll also check out the reading. Everyday is a learning experience with MMF2. Even if I pull a little hair out...

  6. #16
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: specific animation has played a specific frame

    You're welcome.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. How to run game from specific frame?
    By J3sseM in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th July 2013, 07:40 AM
  2. Scale a specific frame?
    By WhiteEyeDesign in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 17th April 2013, 11:48 AM
  3. How do you keep an animation once it has played?
    By RetroRain in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th January 2011, 04:58 AM
  4. Goto specific frame when player leaves area
    By Worf in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th December 2009, 01:07 PM
  5. Need some help (sorry cant be more specific)
    By SEELE in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th May 2008, 09:22 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
  •