Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

How to get to a certain page in a chapter

8 years ago

Hey so I've never actually published a story, but I've fiddled with the editor enough to try the advanced editor. I just really wanted it to organize my story into 9 sections, each with a different ending. They're like the alignments in D&D (lawful good, chaotic evil, etc.) and the player would switch between the chapters depending on their decisions. However I can only figure out how to create a link to the first page in the chapter, and not any page in the chapter. I'd like to have the player be in true neutral and be able to switch to a page in chaotic neutral for example. It's really just for my organizational purposes, but I really hope it's possible. Thanks for helping!

How to get to a certain page in a chapter

8 years ago
Use link scripting. Do this in the link script:

$DEST := @P45

Where 45 is the page id of the page you want the link to go to.

Chapters aren't meant to be used the way you want to, so this workaround is really the only way to accomplish that.

You could also just keep track of the sections yourself without making chapters for each one.

How to get to a certain page in a chapter

8 years ago

That's a sad downside of using chapters.

The easiest remedy that I know of is to turn on advanced scripting, create a link to the first page in a chapter, then go to the link's script and insert something like:

$DEST := @P72

The example above assumes that the ID number of the page you are wanting to link to is 72. The ID number of a page is displayed next to the name of a page in the "pages" section of the editor.

How to get to a certain page in a chapter

8 years ago

Thanks! I'll try that! :)

How to get to a certain page in a chapter

8 years ago

 

IF %VARIABLE = 1 THEN $DEST := @P18 ELSE $DEST := @P16

 

The very first bit of scripting I ever learned. In my case the variable checked whether the player had chosen to kill a certain NPC earlier, and moved them to a different branch of the story if they had.

If you're as hopeless with scripting as I am, I'd also suggest you make use of the notepad under My Stuff, and copy down any little snippets like that as you learn them. There's a lot that act as simple building blocks and can be applied in a billion different ways.

How to get to a certain page in a chapter

8 years ago

Thanks for the advice! What coding language is this in, because I know Java and Python but this doesn't seem like either of them. 

How to get to a certain page in a chapter

8 years ago

It's a custom language made solely for this site.

How to get to a certain page in a chapter

8 years ago

The scripting language used in the advanced editor is a language created by Alexp and unique to this site.

How to get to a certain page in a chapter

8 years ago

Oh ok, that explains it! Thanks! :D