Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Score Scripting

12 years ago

This is a noob question, but how do you get the score to show up on just one page? I can't seem to find the scripting for it.

Score Scripting

12 years ago

Typing %%SCORE%% shows the number of SCORE (or whatever variable you put in between the %% symbols), at the specific place you put it.

Score Scripting

12 years ago

Thank you so much! Now I just need to figure out if there's a way to make the page say different things depending on what the score is. :p

Score Scripting

12 years ago

You can always use variable link restrictions and copy paste the page. After that you could just alter the individual pages to suit the score.

Score Scripting

12 years ago

Okey dokey! ... How exactly would I go about doing that? :p

Score Scripting

12 years ago

The scorekeeper says "%%SCORE%=%1%Score is now one%%%%SCORE%=%2%Score is now 2%%" et cetera

Basically, typing %%SCORE%=%1%Score is now one%% means that the text "Score is now one" only appears if SCORE = 1

Score Scripting

12 years ago

Since the forums are back up for me, I'll post it again so others can see besides the PM I sent.

When a new link is created, look at the icons to the left. Click on the stop sign icon. Once it pops up, go to the variable restriction menu. Select the Score variable. 

Let's say you want three possible pages. One for if the variable is under, over, or at 20. 

Where it says type, select the < icon if you want the link to go to the page with a score less than 20. Select the > icon if you want the link to go to the page with a score above 20. Select the = icon if you want the link to go to the page with a score of 20. 

Then in the value box, put the value as 20. That's just for this scenario, feel free to change it to whatever value you want.

Keep in mind though you have to create three seperate links to three seperate pages for this though.

Score Scripting

12 years ago

She can do it this way but it's more efficient to do it SindriV's way, because that can be done on one page. The format is:

 

%% VARNAME % = % NUMBER % TEXT %% but without spaces

VARNAME = The name of the variable
NUMBER = The amount of the variable
TEXT = What is displayed

I believe you can replace the '=' with '<' or '>' but don't quote me on that.

Score Scripting

12 years ago

Thanks guys! Can finish my game now ^_^

Score Scripting

12 years ago

True, you can use 'greater' and 'less than' as well. It's very handy!

Score Scripting

12 years ago

Even cooler - I just confirmed that you can use != (not equal)  too!

%%VARIABLE%!=%100%TEXT%%

Score Scripting

12 years ago

OH, fucking cool!!!

Score Scripting

12 years ago

Will have to remember this! laugh

Score Scripting

12 years ago

You could always go into the scripting for that page ( the := symbol next to the name and do something like this:

IF %SCORE = >10 THEN $PAGETEXT = $PAGETEXT + "Merry Christmas!"

What that's saying is that if the score is more than ten (for this example) then it will make the text on the page equal whatever you have written for that page plus the words "Merry Christmas". That's only an example, you can change what the score has to equal or what the extra words are. You can also put the extra words in front of the $PAGETEXT to make the extra words come before whatever you have written for that page. It's explained better in the Advanced Scripting article in the Help section of the site.