User Tag List

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

Thread: Animations on keypress which are interruptible at any time with the same key?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Animations on keypress which are interruptible at any time with the same key?

    How can I restart an animation sequence at any time with the same key I used to start the animation sequence?


  2. #2
    Clicker Fusion 2.5 DeveloperiOS 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)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    On key pressed > change animation sequence & change animation frame to 1?

  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,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    +On key press
    - Change animation to "blah"
    - Change animation frame to 0
    - Restore animation frame

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Thanks! I forgot to force the animation frame to first frame.

    I have another issue but I think it's a Windows related problem?
    If I press a key several times(3 times is enough in most cases), the animation gets stuck and when I press the key again I can't do any action.

  5. #5
    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)
    Make sure you are using the user created animations, NOT the premade ones. Sometimes the premade animations have additional functions you might not be aware of. Also, are you using any built-in movements?

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I now used the basic code in a new mfa file and after some key presses no more actions are possible.
    Sometimes both objects get stuck at the same time and sometimes one object first and after some more keypresses it's happening for the other object too.
    I don't think I had these issues before I refreshed my Windows 8.1 Pro, so it could be a conflict with Windows settings and Fusion?

    ani1.mfa

    I'm constantly pressing D key here:


    +On key press D
    - Change animation to "New Animation"
    - Force animation frame to 0
    - Restore animation frame

  7. #7
    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)
    Not sure what you are expecting to happen. I adjusted how your frames look (removed the walk anim frame from the dig anim) and made all anims the same playback rate. But the file does what I expect. Are you thinking you can press D so fast that you will maintain the first frame of the animation as the only thing you see? I don't know if keyboard input can be registered that fast, tbh.

    Attaching my update.
    Attached files Attached files

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I don't understand. In your example I press the button very fast and it doesn't freeze. Why?

  9. #9
    Clicker Fusion 2.5Android Export Module

    Join Date
    Dec 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like the others it works fine for me, though I used to find with animation freezes on custom animations it could help to add a 'on animation finish restore animation sequence' event.

  10. #10
    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)
    I think the "freezing" you saw was the "Stopped" animation frame you had as frame 0 of the Digging animation. Every time you pressed the D key, you were displaying that one frame so it might have appeared as though the Stopped animation was playing. I removed that frame in my example.

    Also, you need to be aware that Fusion will always return to the Stopped animation if it finishes a non-looping, user-created animation. Or at least it should. I have found if you interrupt this natural return to Stopped, you can get stuck on a frame. To get around this, I ALWAYS make my "play one time" animations loop back on their last frame and manually write code that looks for the animation to have reached a specific frame. Then I manually set the animation to Stopped (or whatever your idle animation is). I did this in my example as well.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Detect keypress on iOS
    By ratty in forum iOS Export Module 2.5
    Replies: 1
    Last Post: 19th February 2016, 03:31 PM
  2. [RC2] Problemm with Keypress and edit box
    By Fernando in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 13th May 2013, 07:34 PM
  3. arrows\keypress problem
    By SoftWarewolf in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th August 2010, 12:40 AM
  4. Simple question about keypress
    By Keli in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th April 2007, 12:00 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
  •