Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Showing Variables on Only Some Pages

13 years ago

Excuse me. The editor has an option to show variables on all pages, but can you show it on certain pages? Is it possible?

Showing Variables on Only Some Pages

13 years ago

You can go to the global page script and type in:

$PAGETEXT := $PAGETEXT + "<br>" + "<br>" + "YOUR HEALTH: " + %HEALTH + "%"

To have the bottom of each page include:

YOUR HEALTH: 100% (or whatever Health is at the time) and then you can use IF clauses to have the following appear only if certain requirements are met, such as:

IF $CHAPTERID01 THEN
BEGIN
$PAGETEXT := $PAGETEXT + "<br>" + "<br>" + "YOUR HEALTH: " + %HEALTH + "%"
END

So that Health only appears during Chapter 1 (you can use requirements regarding items or variables as well).

However, if you just want to show the variable at a single page, then you can type %%HEALTH%% anywhere at the page, and then, when viewing the story, it will be replaced with the amount of Health there is at that exact moment, or you can do the same as above, but in the scripting for that page, instead of the global page scripting (as the name indicates, that affects all pages in the story).

Showing Variables on Only Some Pages

13 years ago