User Tag List

Results 1 to 9 of 9

Thread: Stop every object during pause

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Location
    Poland or I think it's France
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stop every object during pause

    Hello folks.

    I'm thinking about an another idea of using the pause menu instead of using Sub-App and the Storyboard controls, is it possible to stop every object moving during the pause like an extension or something?

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,810
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Maybe try putting the whole game into a group.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    Clicker 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)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    3,022
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    It's possible, but not straightforward. You can pause all code by putting it in a giant group that you deactivate, as Marv suggested. Though be warned that any only once when event loops conditions you have will re-trigger as soon as you unpause.

    Deactivating the events is only part of the solution, and is unlikely to properly pause your objects, however. Animations will continue to play. Built-in movements (eg. bouncing ball movement) will continue to move. Movement controlled not by your own events but by certain extensions (eg. flocking object) will continue to move. And the timer will continue to run. You'll have to address each of these issues in turn.

    When it comes to stopping built-in movements and animations, it'll help to attach a qualifier to all relevant objects. Then you can just do single actions for stop/start movement and stop/resume animation on that qualifier. Though if you don't want all resumed animations to restart at frame 0, you'll first need to record which frame they're currently at before you pause them, so that you can resume them at the correct frame. There's another potential issue with animations here. If certain objects are supposed to have their animation frame "forced" to a particular frame, then if you do a blanket resume animation frame when you unpause them, you'll of course cause those animations to play out to the end of their frames, which will probably glitch something. To prevent this, you'll want to first record whether or not they're forced (you'll need the Animation Info extension to be able to read this from an object), and then re-force them after unpausing.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,209
    Mentioned
    199 Post(s)
    Tagged
    0 Thread(s)
    Activating and deactivating groups is the simplest, but in conjunction with that you can:


    1. Create a global value named PauseControl.
    2. Code in with your animations and movements to only run if PauseControl = 0.
    3. If Player clicks on Pause - set PauseControl = 1 / and set it back to 0 to unpause
    4. PauseControl = 1 - set speeds to zero & stop.


    But if you are using a custom pause - do not use certain features, like Run event after 30 seconds, because they will mess up.

    Instead you need to count down global values and trigger events to happen when a global value exceeds a level,

    For example:

    ControlValue1 >= 0
    +PauseControl = 0
    ==Add 1 to ControlValue1

    ControlValue1 >179
    +PauseControl = 0
    ==Do Something
    ==Set ControlValue1 = -1 (So that when it must trigger again, you can set it back to zero and it will start the count again.)

  5. #5
    Clicker Fusion 2.5
    Warmachine's Avatar
    Join Date
    Nov 2009
    Location
    Charleston, WV
    Posts
    686
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Another way to do it is to stop/start movements based on qualifiers. If you have the moving objects set to a qualifier you can set their movement to stop per that qualifier when you pause and start when you resume the game.

  6. #6
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D 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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,357
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    You can also stop built-in movements and animations by messing with Movement Timer, I have a extension for this if you need, but it will affect all animations, so if you want a animated pause menu, you would need a custom animation system.

  7. #7
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,810
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    I like this idea a lot. I will try this.

    Marv

    Quote Originally Posted by Warmachine View Post
    Another way to do it is to stop/start movements based on qualifiers. If you have the moving objects set to a qualifier you can set their movement to stop per that qualifier when you pause and start when you resume the game.
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  8. #8
    Clicker Fusion 2.5 (Steam)
    Linky's Avatar
    Join Date
    Mar 2020
    Location
    Egypt
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To but it simply:
    • Built in Movements: Stop/Start/Set Speed
    • Animations: Stop/Start/Set Speed
    • Sounds and Music: Pause/Resume
    • General Events (e.g. Custom Movements): Deactivate/Activate Groups


    Both ChocoBreak HD and Faulty Flap tutorials include pause systems, they basically use the systems mentioned above, so you can check them out as an example

  9. #9
    Clicker Fusion 2.5 (Steam)
    Linky's Avatar
    Join Date
    Mar 2020
    Location
    Egypt
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah almost forgot, PhysicalMovements: Physics Engine object: World --> Pause/Resume

Similar Threads

  1. Replies: 11
    Last Post: 19th November 2019, 06:04 PM
  2. 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
  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. How to make an object fall on another instance of the object and stop?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 20th June 2013, 09:42 PM
  5. Replies: 10
    Last Post: 15th October 2012, 04:33 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
  •