Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Variables

9 years ago

Hi! I'd like to ask, how do you make a variable appear on a specific page

 

Let's say I want to put my health stats on one page. How would you do that?

Variables

9 years ago

Use on-page coding. On the page, just put something like "Health: %%HEALTH%%" and it'll replace the percent sign thing with the value of health.

Variables

9 years ago

I tried it and it worked! Thank you very much.

Variables

9 years ago

There is a slightly more involved process that is good for things like battle sequences, which are numerous and involve certain stats you don't want otherwise displayed. You would create a variable called ISDISPLAY. On a link leading to a battle, you would set ISDISPLAY to 1. On a link ending a battle, you would set ISDISPLAY to 0.

Then, in your global page script you would input:


IF %ISDISPLAY = 1 THEN $PAGETEXT := $PAGETEXT + "<p>Your current health is: " + %HEALTH


Note: You may need to have the site's Rich Text Editor turned off to use the <p> HTML tag, which will create a separate paragraph for the health display text, rather than tacking onto the end of another paragraph.

Variables

9 years ago

A little complex, but thanks