Greetings!
I want to change the name of the Next button.
How can I do this?
Greetings!
I want to change the name of the Next button.
How can I do this?
*Page_break This is the text that appears on the button
(after â*Page_Breakâ)
So for example:
*Page_Break Go
Would make the button say âGoâ
Thank you.
So there is no other way to change this button?
Do I have to put a Page_break after every choice?
Because I use *finish to end every choices.
You can edit *finish in the same way as *page_break.
Type *finish Onto the next part of the story.
The button will say âOnto the next part of the storyâ.
@andymwhy Your right. But there is a problem.
My choice structure goes like this:
*choice
__#Choice 1
____Blah blah blah blah
____*choice
______#Choice 3
________Blah blah
________*finish Go
______#Choice 4
________Blah blah blah
________*finish Go
__#Choice 2
____Blah blah blah
____*finish Go
So, if I choose choice 1, and then Choice 3, the page between choice 1 and choice 3 ends with a âNEXTâ button. But, at the end of choice 3, 4 and 2, the page ends with âGOâ. I want all pages to end with something different than Next. I mean, I want all pages ends with âTurn The Pageâ
Any ideas?
Itâs proving difficult to get the indentation right, because of how youâve indented choices, you tend to end up âfinishingâ a top level choice, before executing the ones further down.
You could just set your choices below labels, it might be less convenient but itâd work at least.
Scratch that, either Iâm missing the obvious or this isnât all that doable, not every single button, anyway. Unless you edit the Javascript interpreter, it is 12AM so Iâm probably just overlooking something.
-> It seems to be impossible (through choicescript) to change the actual ânextâ button on the choice screen, that will always be ânextâ - you can only change it on non-choice pages.
You can do it but you need to edit scene.js in the folder above âmygameâ
Scroll down to line 504 in that file and youâll see:
if (!buttonName) buttonName = âNext Chapterâ;
Change the bit inside the quotes to Turn the Page
Replacing âNextâ is a bit more complicated, but itâs all in the scene.js file, although thereâs other references to it elsewhere so doing this could cause bugs, entirely up to you, but thatâs how youâd probably have to go about it.
Thank you CJW.
Iâve dug in, and found itâs the ui.js which need to be modified for changing the âNextâ buttons.
Search for â printButton(âNextâ, ', and change it as you wish. For my game, I only needed to change 2 places (in lines 926 and 2226 in commit 30b07ef999238e664ba9ed6585104e10d06f20f2, May 31). I didnât test the others.
I defined a variable for the name at the top of the file, so Iâll only need to replace at one place, should I change my mind.
A whole lot easier to just make them all one variable:
*create page_break_text "Whatever"
foo
*page_break ${page_break_text}
Still only one place to replace everything.
@RETowers It works most of the time, however, as the OP has mentioned,
there are times when it wonât. CJW wrote about it:
then
What I found was the location of these labels, as I posted above, in the ui.js file. I thought it might be helpful. But by creating a variable I meant, quite ambiguously, creating a JavaScript variable in the .js file, then changing it like this:
var nextButton = "Your button text goes here";
...
if (!hideNextButton) printButton(nextButton, main, false, function() {
...
printButton(nextButton, form, true);
I know that itâs not the most elegant solution, but it will work even when others wonât. You might need to change different instances of âNextâ in different games.