# About The "NEXT" Button

**URL:** <https://forum.choiceofgames.com/t/about-the-next-button/466>\
**Category:** ChoiceScript Help\
**Created:** [May 16, 2012, 6:58pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466 "2012-05-16T18:58:10Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mert](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Mert](https://forum.choiceofgames.com/u/Mert)\
**Post date:** [May 16, 2012, 6:58pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/1 "2012-05-16T18:58:10Z")

</div>

Greetings!

I want to change the name of the Next button.  
How can I do this?

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [May 16, 2012, 7:28pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/2 "2012-05-16T19:28:30Z")

</div>

\*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”

---

<div class="post-metadata">

**Author:** ![Mert](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Mert](https://forum.choiceofgames.com/u/Mert)\
**Post date:** [May 16, 2012, 8:06pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/3 "2012-05-16T20:06:43Z")

</div>

Thank you.  
So there is no other way to change this button?

---

<div class="post-metadata">

**Author:** ![Mert](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Mert](https://forum.choiceofgames.com/u/Mert)\
**Post date:** [May 16, 2012, 8:08pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/4 "2012-05-16T20:08:33Z")

</div>

Do I have to put a Page\_break after every choice?  
Because I use \*finish to end every choices.

---

<div class="post-metadata">

**Author:** ![andymwhy](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/andymwhy/32/34396_2.png) [@andymwhy](https://forum.choiceofgames.com/u/andymwhy)\
**Post date:** [May 16, 2012, 8:10pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/5 "2012-05-16T20:10:16Z")

</div>

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”.

---

<div class="post-metadata">

**Author:** ![Mert](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Mert](https://forum.choiceofgames.com/u/Mert)\
**Post date:** [May 16, 2012, 8:17pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/6 "2012-05-16T20:17:42Z")

</div>

@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”

---

<div class="post-metadata">

**Author:** ![Mert](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Mert](https://forum.choiceofgames.com/u/Mert)\
**Post date:** [May 17, 2012, 6:56pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/7 "2012-05-17T18:56:03Z")

</div>

Any ideas?

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [May 17, 2012, 7:10pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/8 "2012-05-17T19:10:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [May 17, 2012, 7:45pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/9 "2012-05-17T19:45:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mert](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Mert](https://forum.choiceofgames.com/u/Mert)\
**Post date:** [May 17, 2012, 8:49pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/10 "2012-05-17T20:49:20Z")

</div>

Thank you CJW.

---

<div class="post-metadata">

**Author:** ![GregT](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@GregT](https://forum.choiceofgames.com/u/GregT)\
**Post date:** [July 9, 2018, 12:55pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/11 "2018-07-09T12:55:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [July 9, 2018, 3:47pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/12 "2018-07-09T15:47:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GregT](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@GregT](https://forum.choiceofgames.com/u/GregT)\
**Post date:** [July 10, 2018, 12:36pm UTC](https://forum.choiceofgames.com/t/about-the-next-button/466/13 "2018-07-10T12:36:47Z")

</div>

@RETowers It works most of the time, however, as the OP has mentioned,

> [@Mert](#):
>
> So, if I choose choice 1, and then Choice 3, the page between choice 1 and choice 3 ends with a “NEXT” button

there are times when it won’t. CJW wrote about it:

> [@CJW](#):
>
> -\> 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’

then

> [@CJW](#):
>
> 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.

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:

```choicescript
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.
