WatchNon-threaded

Forums » Advanced Editor Forum » Read Message

Talk about it. Ask for help on it. Compliment it.

Issues with $PAGETEXT

2 months ago

I'm just playing a bit around with the editor, and on the first script I've already come up with some problems. The script seems very simple, and like it should not be giving me issues. I even copied the syntax from the "advanced scripting" article to make sure I didn't fuck something up.

Here's my script:

$PAGETEXT := "Yeah, yeah go to your seat John. blah blah blah...

As you're heading for your seat, blah blah blah." + $PAGETEXT 

 

I've placed that in the := button in the "link" to a new page. But the page in question remains unchanged no matter what I do.

I've turned on the advanced editor in the story options. It seems simple and it's annoying me that it's not working.

 

Edit: And while I'm here already, another probably very dumb question: How do I go "back" to the page with all my other pages (in the editor, not talking about a page with all other pages in the story) while editing a specific page? The only 3 buttons I have on screen are "save changes", "add link" and "add link to new page". Not seeing any "back" button or anything, and the "navbar" I have otherwise disappears.

Issues with $PAGETEXT

2 months ago
$PAGETEXT goes in the script box up by the title of the page it appears on, not a link script.

And when you're done editing a page, just close it. Editing or creating a new page always opens a new tab, your chapters and pages index will still be in the original tab.

Issues with $PAGETEXT

2 months ago

So it has to be up there? That's a bit of an issue for what I want to do which is:

Page A: Page A contents with 3 different links that will all lead to page B.

Page B: Has some text on its own but will have additional text based off the choice the player made in the A page.

I guess I could make a new var and change it in the page A links, and then check for if on page B, but that sounds pretty crude. Is there a better way?

There's also always just making 3 similar pages but that's what I was trying to avoid doing in the first place.

And about the editing: That is not my experience. Editing or creating new pages just opens it in the tab I'm currently using, not the new tab. Using Firefox latest version and Windows 7.

Issues with $PAGETEXT

2 months ago
Just use a variable. All you need to do is add a small if before the pagetext stuff.

Issues with $PAGETEXT

2 months ago
Yes. Use one variable. Set it to different values on the link. Then use the if statements with pagetext on the second page.

Issues with $PAGETEXT

2 months ago

That's what I ended up doing. It just kinda looks ugly to me, which is why I didn't want to do it.

%%VAR1%=%1%Text.%%%%VAR1%=%2%Text%%%%VAR1%=%3%Text.%%
 

Found that in some other thread here. Looks ugly but does the job well.

Issues with $PAGETEXT

2 months ago
...

No that is not what you ended up doing. You ended up moving it to being on the page text. That's not the same as what I suggested. Penguin is showing what I suggested.

Issues with $PAGETEXT

2 months ago

Is there an important difference? I'm unfamiliar with the editor and assume all the  %%%%% are a shorthanded version of "if var = 1".

I do have a variable changed by the links before. That's the one I'm comparing. Typing in my text directly instead of using $PAGETEXT lets me format it better (or at least without typing out the html manually) and lets me place it wherever I want in the story, not only at the beginning or the end.

Issues with $PAGETEXT

2 months ago
%%% stuff is for on page variables. You can add text in line on the page. The ACTUAL page.

$PAGETEXT that represents all the text on the page. You add/remove text to the front or end of it using the variable within the SCRIPT of the page.

Is there an important difference? Not really, they're just two ways to effectively accomplish the same thing.

Issues with $PAGETEXT

2 months ago
Does $PAGETEXT let you check for different variable combinations? (OR or AND?)

I assume it does, always figured that was the main benefit it had over on page scripting

Otherwise I really have no idea why anyone would use it, it seems a lot less flexible.

Issues with $PAGETEXT

2 months ago
Yeah, that is the primary benefit of $PAGETEXT vs, On-Page.

On-Page is easier to put into the flow of your writing, but only allows Greater Than, Less Than, Equal, or Not Equal comparisons to a single Variable.

$PAGETEXT allows you to compare more than one Variable against each other at a time, but is more challenging to fit into the word-flow.

Issues with $PAGETEXT

2 months ago
In general I take into consideration more where on a page the text will be rather than the conditions to determine which method I use. Reality is you can also do additional scripting to make any sort of complex logic you need compressed into a single variable check. $PAGETEXT is easier to handle, but has the limitation of only being at the beginning or end. On page just looks awful, so I like to avoid it if possible.

Issues with $PAGETEXT

2 months ago
Exactly what killa said.

I'm not sure of the exact syntax, but here's my logic:

(The variable changes to 1,2,3 based upon the page you select in the link script, but the below is in page script)
IF VAR == 1:
$PAGETEXT := "First page" + $PAGETEXT
ELSE IF VAR == 2:
$PAGETEXT := "Second Page" + $PAGETEXT
ELSE IF VAR == 3:
$PAGETEXT := "Third Page" + $PAGETEXT

Issues with $PAGETEXT

2 months ago
The problem with the op script is the fancy quotes.

You need to use straight quotes " in scripting.

Issues with $PAGETEXT

2 months ago
Or you broke the script with a regular paragraph. You have to use html page and line breaks.

Issues with $PAGETEXT

2 months ago

I did use straight quotes. I tried both typing it in myself AND straight up copy pasting the syntax form the provided article, just to be 100% sure.

And I also thought paragraphs might be breaking it, but it didn't work either when the text to be added was literally just "penis" (because I'm very mature and debug everything by printing out penises everywhere).

Issues with $PAGETEXT

2 months ago
I didn't go digging around into any scripting, but I checked and your actual story text doesn't use plain text, and copy and pasting may have the same issue.

This is a big reason I always suggest turning off the RTE when you're writing. You can disable it in your profile, you just have to log in and then out again before it kicks in.

Issues with $PAGETEXT

2 months ago

How did you check my story text though? I thought it wasn't published.

Issues with $PAGETEXT

2 months ago
Oh that. Well you see, I just happened to be watching when you brought it up on your computer. (Btw, you should top off the cat's water bowl, it's looking a little low.)

Issues with $PAGETEXT

2 months ago

Oh that's creepy, that means you're not the only one that's been creeping in my apartment, considering I don't have a cat. What kind of burglar breaks into your house just to drop off a cat water bowl?