CutterCross
Active member
Here's how you can make a simple pause feature like what I made in this video: https://www.youtube.com/watch?v=uHhjsfl64dk
First, you'll need to make a new input script with this code:
You'll then need to go to the Input Editor and set it as "Press" to whatever button you want it to be (most commonly Start).
Lastly, you'll want to open up DrawNPCText.asm and edit which button will advance/end the text. (By default it's set to the B button.)
On lines 48-52:
All you need to do now is set up some text that says "Paused" and set it up in a text group, then apply it to all your screens you want to be able to pause in.
NOTE: This is assuming you're not using text for anything else in your game. If you are using text for other things, you'll need to set up some constraints for this system as well as applying different text groups for other text.
First, you'll need to make a new input script with this code:
Code:
;;;;Simple Pause script by CutterCross
;;Put whatever constraints/conditions you DON'T want the game to pause in up here. If those conditions are true, branch to skipPauseText
LDA textBoxFlag
BNE skipPauseText
LDA #$00
STA stringTemp
LDA #$01
STA textBoxFlag
skipPauseText:
RTS
You'll then need to go to the Input Editor and set it as "Press" to whatever button you want it to be (most commonly Start).
Lastly, you'll want to open up DrawNPCText.asm and edit which button will advance/end the text. (By default it's set to the B button.)
On lines 48-52:
Code:
canPressBeBecauseNotWritingText:
LDA gamepad
AND #%00001000 ;; is the start button pressed when there is a textbox on the screen?
BNE turnOffTextBox
JMP dontTurnOffTextBox
All you need to do now is set up some text that says "Paused" and set it up in a text group, then apply it to all your screens you want to be able to pause in.
NOTE: This is assuming you're not using text for anything else in your game. If you are using text for other things, you'll need to set up some constraints for this system as well as applying different text groups for other text.