User Tag List

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

Thread: Help with pause.

  1. #1
    No Products Registered

    Join Date
    Dec 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with pause.

    Hi, i wonder if someone could help me. Im gonna describe what i need help me.

    This is for a game im working on. I need my game to pause when im open up my inventory screen. So everything except my inventory should pause. I mean like enemys moves,shots, bullets and so on.

    Thx hope you can help me.

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    May 2011
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What if you put your inventory in a sub-application?

  3. #3
    Clicker Multimedia Fusion 2 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use a Game Loop ( create your own Pause function ), i will descibe how in 3 steps.
    ...

    (1)
    Youl need a PauseCounter wich decides if the gams is in Pause or Play. As long as PauseCounter = 1, a FastLoop should run:

    PauseCounter = 1
    --> Start FastLoop "GL" 1 time

    ( the idea is, as long as FastLoop "GL" runs, the game runs )
    ...

    (2)
    Now all your conditions ( except the conditions for your Inventory ) should start with 'On FastLoop "GL"', like this:

    On FastLoop "GL"
    + Condition
    + Condition
    --> Action

    ( this makes sure your gameplay/ game-code only run when FastLoop "GL" is running )
    ...

    (3)

    If you do steps 1 and 2, all you need to do to pause the game is:

    Condition
    --> Set PauseCounter to 0
    --> Stop any built in movement if your using those
    --> Stop all animation sequences

    If you want to resume the game:

    Condition
    --> Set PauseCounter to 1
    --> Start any built in movement if your using those
    --> Start all animation sequences

    ( The reason you have to start and stop Animations and the Built In Movements manually, is because Animations and Built In Movements are not dependant on the Event Editors code to run )
    ...

    Now since the code/ conditions for your Inventory does not start with 'on FastLoop "GL"'', your Inventory will still work when the actuall gameplay is paused.

  4. #4
    No Products Registered

    Join Date
    Dec 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm... i dont know how to work with a sub-app.

  5. #5
    No Products Registered

    Join Date
    Dec 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well then i have to go back and put in that FastLoop on every condition. And i got alot of condtitions. Would take some time to do that.
    I need something easier, like pausing a layer or something.
    Since im using layers i could just pause all layers except my inventory layer.

    Thx for your time!

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    oruga's Avatar
    Join Date
    Feb 2012
    Posts
    366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think that game loop method will work when you use built in movements, or bullets which I think you cannot stop and then resume.

    Use this, works fine: http://community.clickteam.com/showthread.php?t=69750&p=516383&viewfull=1#post516 383

    Search the forum before asking, many information is already there.

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    King_Cool, why do you need to have a fastloop running? Why not just have a value that is 1, and then start every event with "if value = 1?" Then you just need to change this value to 0 when wanting to go into pause?

  8. #8
    Clicker Multimedia Fusion 2 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Outcast, you are right
    If your using the GL method i mentioned youl also be able to pause as well as slow down time, but thats not what Mrtin asked for at all

    EDIT:
    Yeah, 'launched' obejcts and object using Built In Movements will have a hard time obiding to the law of the Pause, but a workaround for those objects shouldnt be hard to make ( by for example store their possitions when Pause is not active, and reposition the objects to their stored possitions when pause is active ). I peronally dont use Built In Movements or Launch objects.
    Sweet example Oruga, very nice

  9. #9
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Why not throw your code in groups, and enable/disable them when you need to?
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  10. #10
    No Products Registered

    Join Date
    Dec 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So many post here and im grateful for them all. I think i will try for that sub-app thing, i just found out how easy it was to work with it.
    Btw i had no idea you could disabled/enabled a group of events just like that. Luckily i have all my events in groups.
    I will try them both out and when im done i can come post and tell you what i prefer best.

    Thanks to you all!

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 10
    Last Post: 15th October 2012, 04:33 PM
  2. Need a better way to pause...
    By Konidias in forum Multimedia Fusion 2 - Technical Support
    Replies: 22
    Last Post: 15th October 2010, 11:20 AM
  3. Best Way to Pause
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 30th December 2009, 07:13 PM
  4. PAUSE?
    By scurvy in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 30th May 2009, 07:51 PM
  5. Pause
    By Hordolur in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 24th July 2008, 08:11 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
  •