Is there a way to pause an application with an in-built function or an object/extension?
Is there a way to pause an application with an in-built function or an object/extension?
I recall there being extensions to do this in MMF 1.5, however the best way, and this is exactly how I would do it would be:
Thanks to sub-groups in MMF2. Put everything in 1 large group (even groups) and then have a pause event that just activates and deactivates this group. All the events, even special effect particles, will stop moving and start back up when the group stops and starts.
In addition, this gives you a higher flexability as far as pausing goes, because it allows you to make things like pause menus with options. Something you cant make if you pause the entire game, because this would make the menu screens pause aswell. <img src="/center/images/graemlins/wink.gif" alt="" />
Hope this helps!
a other way is to use a sub app with modal checked in window style, lets say when press esc the game should pause, then show the sub app, the main frame will be completly frozen until you exit the sub app

Yeah Subapps is IMHO the best way to do it.
That way you don't have to fiddle with disabling and reenabling events and worry about things getting out of sync or about the fact that you can't pause objects that are shot and stuff like that.
press CTRL+P and the application will be paused.
The best way I've found is tie nearly everything that moves with a "freeze" counter.. all the events related must have a "If counter=0".. so when the counter=1 (you press Esc or something), the move won't occur






The problem I have had with the sub-app as pause using modal is that in a scrolling game, I can never get the sub app to center the screen, it pauses the game alright but it stays in the top corner of the whole window and not the visible frame. Is there a way to fix this?

Use the window control object on the sub-app and at start of frame:
Window Control Object:-
Set Position X= (Screen X size( "Window Control" )/2)-(ClientWidth( "Window Control" )/2)
Set Position Y= (Screen Y size( "Window Control" )/2)-(ClientHeight( "Window Control" )/2)
That should center the window in the center of the screen as long as its a popup window!
Great Scott!
Benjamin is right! I Didn't know MMF2 had that feature...though the pause-window is not what I would call 'good looking'.
I think I'll try the sub-app.
Thanks to all of you!!!
Hm...not bad. But there should be a way to pause/continue the game in the event-editor.
To Jeff or Yves: Would it be possible to ad this?