トピック
Kalvin Noctise

Pause

how do you make a pause button?
0そうだね
プレイ済み
返信[1]
親投稿
raimondz raimondxz
You can create one using spset and a sprite. If you want to make the functionality, then you need to skip your "update" code from your game cycle. I don't know if you used that in your game but that's how I do that. By the way, here is a page that explain the concept of "game loop": http://gameprogrammingpatterns.com/game-loop.html
1そうだね
プレイ済み
返信[2]
親投稿
C. Norris 06495a
There is a good tool kit on smilebasic source called ezSB It includes a pause function, as well as other functions.
1そうだね
プレイ済み
返信[3]
親投稿
Oscar PwnageBlock
It's rather simple, really. Within your game's main loop, you can have a certain button lead to another loop, which is a pause loop, in which you can do anything you want the pause to do until you unpause it. Unpausing is probably even simpler, since all you need to do is exit the pause loop and carry on with the game's main loop.
0そうだね
プレイ済み
返信[4]
親投稿
Oscar PwnageBlock
Example: WHILE GAME 'MAIN GAME LOOP 'DO GAME STUFF IF BUTTON() AND #Y THEN 'PAUSE WHEN Y IS PRESSED WHILE !(BUTTON() AND #Y):WEND 'SIMPLE LOOP THAT UNPAUSES WHEN PRESSING Y AGAIN ENDIF WEND
0そうだね
プレイ済み