User Tag List

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

Thread: When animation is over event not being triggered

  1. #1
    Clicker Fusion 2.5Fusion 2.5 MacAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    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
    Jun 2015
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation When animation is over event not being triggered

    When one of the animations I have is over, the event for it is not triggered. Can someone please help?

  2. #2
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    715
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Do you have an event that says,

    Animation (Active) has finished: Do something?

    It would be easiest to help if you post MFA! Good luck.

  3. #3
    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,284
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    I never use the "animation is over" condition because I always find it buggy. It is safer to have your animation loop the last frame and then have a condition:

    +Is animation "animation name" playing
    + Is current frame = XX (XX is the number of the last frame. remember the frames are 0 based even though the frame editor is 1 based (sigh))
    - Change animation to "animation name"

    One thing to remember is to have a duplicate of your last frame so it is actually viewed when the animation plays. Otherwise it will switch the animation before it is actually drawn.

  4. #4
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I do the same as mobichan, but a tiny bit differently.

    Instead of "If frame = X" I have "If frame >= X" and make a few extra dummy animation frame copies at the end JUST IN CASE there's an internal hiccup and MMF doesn't catch that exact frame at that point in time for whatever weird reason.

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    715
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Ohhhh. Cool. I always learn something new. Darn, buggy? I'm newer and assume that everything will work just right! .

  6. #6
    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,284
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    I find if you are looping the last frame, then the animation will get stuck on a specific frame number. Eventually the condition will return true. :P If only Clickteam would add the "Total number of frames" expression. Then you wouldn't have to update the condition when you change the frame count of the animation.

  7. #7
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export Module
    Emerson3's Avatar
    Join Date
    Apr 2014
    Location
    Lafayette, Louisiana
    Posts
    715
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Mobichan,

    I always look for "Total number of frames." Also, is there a condition like: On animation (whatever) frame number (whatever)?

  8. #8
    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,284
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    It can be buggy if you are relying on the build-in behavior of the Stopped animation. In some cases it can cause the animation to not change back to Stopped. But it is generally better to not use any of the pre-built animation slots if you plan to do anything of a complex nature with animations.

    @Emerson3: you need 2 conditions: "Is animation playing?" and "Does current frame = XX". There is no "total frames" expression yet.

  9. #9
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,540
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mobichan View Post
    I find if you are looping the last frame, then the animation will get stuck on a specific frame number. Eventually the condition will return true. :P If only Clickteam would add the "Total number of frames" expression. Then you wouldn't have to update the condition when you change the frame count of the animation.
    I may be able to help
    The Animation Information object created by Jaffob should be able to provide you just that expression;
    http://community.clickteam.com/threads/63887-Animation-Info-Object

    I should make a note to this. If you were trying to adapt the aforementioned "If current frame of object >= 10" to a dynamic bound instead of static integer, you might simply swap out that static 10 for the retrieved value from this object. But these two expressions are not identical:



    ^that code doesn't work like intended

    Even if you add conditions to only check for specific animations where the count is 10, keep in mind that when you reference an object inside the latter half of a comparison in MMF, it won't be scoping that object against itself when it compares its conditions. So when MMF2 reads through the list of objects one by one to compare to this dynamic variable of "total frames of {object}", it will compare each object against the total frames only of the first object and ignore all other copies. Now since under normal circumstances all objects of the same type will have the same number of frames in their animation since its a shared resource, you might not notice this, but since the animation info total frames count is retrieved from only the currently active animation, if different instances of the object are playing different animations, the code might break down

    So to compare safely on each instance of an object, do the comparison logic in a separate line that resolves into a single variable, then compare that variable to a static integer, like this:



    ^that code works for any number of instances of the object

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sparckman's Avatar
    Join Date
    Feb 2011
    Location
    Planet of the Kangaroos
    Posts
    1,423
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I use "animation has finished " a lot. I ve neva find any issues with it. Can ya post an example to check it out?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Disapperaing Animation - Event Loops
    By bad_rick in forum Fusion 2.5
    Replies: 9
    Last Post: 28th October 2014, 06:01 PM
  2. Flickering values indicates that it's triggered?
    By Literswater in forum Fusion 2.5
    Replies: 4
    Last Post: 25th August 2014, 01:39 AM
  3. Slowdown of triggered events
    By MattEsch in forum Extension Development
    Replies: 4
    Last Post: 26th July 2010, 10:08 PM
  4. Actions triggered after a set time
    By Arnax in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 26th January 2008, 09:55 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
  •