Getting Frame rate to Absolute 0....Impossible?
In my game, when the character speeds up to do power attacks, right before he connects to the character, I want the frame rate to drop to 0 and halt the entire game for about a second before smashing him in the face and return the game to full speed.
I've done a few tests in which I associated the frame rate with a counter that would begin dropping as soon as a button was pressed, and this worked to an extent. The game still ran at 1 frame per second which kills the effect I was going for.
It actually reaches 0, but goes back to 1 shortly there after.
I already know a few workarounds of setting positions of objects on screen and halting animations, but I'd really prefer to just halt all action on screen if it is in fact possible since that would save me a good chunk of time.
If anyone knows how to get it to absolute 0, you'd you be my hero.
Thanks in advance
-Zenoff64
Re: Getting Frame rate to Absolute 0....Impossible
Well when you think about it, this is not possible. The events in MMF2 are run every frame, so if the frame rate is 0, this would effectively stop the game entirely, and possibly crash it.
Just avoid changing the frame rate. Just do the halting animations thing.
Re: Getting Frame rate to Absolute 0....Impossible
try fast loop with fake action when your trigger your action:
* upon pressing any key
->(counter): set counter to 0
->Start loop "wait" 1000000 time (or more if you need more freeze time)
* On loop "wait"
->(counter): Add 1 to counter
When the fast loop run, the normal flow of MMF2 stop (frame rate 0) until the end of loop. At the end of loop the normal flow restart with the normal frame rate.
Re: Getting Frame rate to Absolute 0....Impossible
That would mean that faster computers would have less of a wait.
Re: Getting Frame rate to Absolute 0....Impossible
LazyCoder: Not if all run at 60 FPS.. Correct me if im wrong.
Running at 0 frames per secound means that 0 frames are "running" every secound... Well ... 1 is minimum i think...
Re: Getting Frame rate to Absolute 0....Impossible
perhaps you cannot go to 0 frame a second, because nothing would move (not even the single active).
Just a wild idea ;)... Create a qualifier group for every object, and then change the whol groups animation speed to a low number, then speed it back up again after?
Anyway may not fit what you are looking for but i thought i would mention it as something to think about.
Jason
Re: Getting Frame rate to Absolute 0....Impossible
As far as I know, an extension is capable of freezing the application. All you need to do is to ask an extension developer to create an extension that pauses the application for a set time interval, rather than until the user presses a key (which there's already an extension that does).
It's probably an easy extension to create. If you can't get someone to do it for free, just offer moneys - for an extension like that it shouldn't have to be much.
Re: Getting Frame rate to Absolute 0....Impossible
The Time X object has this feature...
Re: Getting Frame rate to Absolute 0....Impossible
Lazycoder & Cocodrilo:
Frame rate doesnt affect fastloops, hence why they can effectively pause the game. faster computers would have less of a wait, as when you make a game that uses lots of loops and lags, you'll find it doesn't lag on a better computer (or at least lags less)
Zenoff64:
I'd recomend jasondarby's solution as then you could also add funky effects in in the pause, making it even more awesome. Any methos of pausing the enire application would stop this.
Re: Getting Frame rate to Absolute 0....Impossible
Uhhh, that's what I said...
Re: Getting Frame rate to Absolute 0....Impossible
"Uhhh, that's what I said..."
lmao, funny yet true