A simple script made on OpenBOR used to customize the pause menu options. Tested in the build 6391 and upcoming v4.0, but may work on others as well.
The main changes are in the update.c file (not the updated.c) and some parameters defined on the levels.txt using the
Installation:
Simply copy the update.c file inside this BOR mod to your game and copy all the
NOTE
Depending on the new options added you may give the ESC key effect first to quit the pause menu and then run your desired code, because some events only can run if the game is not paused. You can see an example in the "End Game" function.
Step 1: Check the
Step 2: Once the game is not paused anymore, execute the
In case you use other ways to run the "how to play" scene like entities or drawsprite you can adjust the layer value to show the pause menu text behind or in front of the scene. The value of -1000000003 used in the example below is to put the menu text behind a gif animation, same as shown in the video.
Don't forget that the pause menu text is totally scripted and the translation.txt file will not change anything on it. Instead, you must change the text directly inside the script.
And some events don't need to play the default engine beep/beep2 samples, only the ones where they are missing.
The main changes are in the update.c file (not the updated.c) and some parameters defined on the levels.txt using the
pauseoffset
command to hide the native menu.Installation:
Simply copy the update.c file inside this BOR mod to your game and copy all the
pauseoffset
parameters inside your levels.txt. In case you already have another update.c file, you can mix both by copying all the content to your already existing update.c, rename the new function from void main()
to another name like void pauseMenu()
and then call it inside your previous void main()
.NOTE
Depending on the new options added you may give the ESC key effect first to quit the pause menu and then run your desired code, because some events only can run if the game is not paused. You can see an example in the "End Game" function.
Step 1: Check the
anybutton
press, give an ESC effect in order to return to the game.Step 2: Once the game is not paused anymore, execute the
gameover()
function same as the "End Game" does.In case you use other ways to run the "how to play" scene like entities or drawsprite you can adjust the layer value to show the pause menu text behind or in front of the scene. The value of -1000000003 used in the example below is to put the menu text behind a gif animation, same as shown in the video.
Don't forget that the pause menu text is totally scripted and the translation.txt file will not change anything on it. Instead, you must change the text directly inside the script.
And some events don't need to play the default engine beep/beep2 samples, only the ones where they are missing.