Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Variable Page That Only Appears Once?

3 years ago
So I have a Variable in my game where once enough relationships points have been achieved the player will be sent to a page that says "Your Relationship with X has Improved," I only want this text to appear once and not interfere with the game again. How would I go about doing this? I'm new to all of this and basic when it comes to everything such as Scripts and Variables. Help would be much appreciate :)

Variable Page That Only Appears Once?

3 years ago
Easiest thing would be just to set the variable up to have it send them to that page automatically once the total is reached, then provide a Go Back link. Nothing should be blocking progress like you mentioned in your other thread unless you set up a link restriction to do that.

Variable Page That Only Appears Once?

3 years ago
Ok. I get it now, thank you

Variable Page That Only Appears Once?

3 years ago
Make sure you have enabled Advanced Scripting; Set a Global Script -

IF %VARIABLE > 100 THEN
BEGIN
IF %ONCEONLY < 1 THEN
BEGIN
%ONCEONLY := 1
$DEST := @P200
END
END

%VARIABLE is the Relationship Score; 100 is whatever you want to set the trigger to; %ONCEONLY ensures it is only run once; 200 is whatever page you want it to go to when triggered.

Variable Page That Only Appears Once?

3 years ago
Oh yeah, I forgot to mention actually raising the variable by 1 as they leave that page.

Global script is how I'd have handled it but the setting there when you create the variable itself seemed more straightforward for a noob.

Variable Page That Only Appears Once?

3 years ago
Yeah, I checked that out too, but the Variable Events section of Variables only allows Greater or Less Than Comparisons, which makes it useless for this particular issue.

Variable Page That Only Appears Once?

3 years ago
Oh seriously? That seems like a weird oversight.

Guess it shows how often I bother looking at the variable settings.

Variable Page That Only Appears Once?

3 years ago
Perfect, just what I needed. Thank you!! :)