Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

$PAGETEXT Problems

10 years ago

I'm having some trouble with $PAGETEXT in the Global Page script. I'm trying to make it display two lines of text, one on top of the other. However, when I playtest, they're displaying side by side. I looked at the tutorials, and I've been messing with the script for awhile, but I can't seem to figure out what the problem is. Is there a way to fix this?

$PAGETEXT Problems

10 years ago

Well what does your global page script actually have?

$PAGETEXT Problems

10 years ago

Alright, so this is what's on my global page script:

$PAGETEXT := $PAGETEXT + "The time is "

IF %HOURS > 9 THEN $PAGETEXT := $PAGETEXT + "0" + %HOURS + ":"
IF %HOURS < 13 THEN $PAGETEXT := $PAGETEXT + %HOURS +":"
IF %HOURS > 12 THEN
BEGIN
%TEMPHOURS := %HOURS - 12
IF %TEMPHOURS < 10 THEN $PAGETEXT := $PAGETEXT + "0" + %TEMPHOURS + ":"
IF %TEMPHOURS < 13 THEN $PAGETEXT := $PAGETEXT + %TEMPHOURS +":"
END

IF %MINUTES < 10 THEN $PAGETEXT := $PAGETEXT + "0" + %MINUTES
IF %MINUTES > 9 THEN $PAGETEXT := $PAGETEXT + %MINUTES

IF %HOURS < 13 THEN $PAGETEXT := $PAGETEXT + " AM"
IF %HOURS > 12 THEN $PAGETEXT := $PAGETEXT + " PM"


$PAGETEXT := $PAGETEXT + "Your Health is "

IF %HEALTH < 50 THEN $PAGETEXT := $PAGETEXT + "low. Visit the infirmary or sleep to increase it."
IF %HEALTH = 50 THEN $PAGETEXT := $PAGETEXT + "at half."

IF %HEALTH > 50 THEN
IF %HEALTH < 100 THEN
BEGIN
$PAGETEXT := $PAGETEXT + "high."
END

IF %HEALTH = 100 THEN $PAGETEXT := $PAGETEXT + "full."

 

I'm trying to make it so that the "Your health is " text appears below the "The time is " text, but they keep appearing next to each other when I playtest.

$PAGETEXT Problems

10 years ago

Do:

"</br>Your Health is "

Instead. </br> is a line break, which will make you go down one line, making them on two seperate lines.

$PAGETEXT Problems

10 years ago

Ah, that fixed it! Thanks!

$PAGETEXT Problems

10 years ago

Ah a time script with A.M and P.M. I have such a script in my story game.