Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Conditional linking script not working

8 years ago

I have hit the second wall in my story writing. I reread several times the scripting help, and just can't make things work (and maybe there is an easier way?)

I need links in pages to be active or inactive depending on the race chosen. This way, when the player decides if he wants to join the elves or the dwarves in their adventures, he is sent to different pages depending on race. In Tolkien's universe, elves and dwarves are averse to each other, and they will react differently to each race trying to join them.

Also, I have a page where there are many options, and to which the players can go back after branching their story. I want them to only be able to click three of the links before they are required to continue the story. How do I do that?

Conditional linking script not working

8 years ago

For the first one, make sure you have advanced variables on and use the stop sign next to the link item.

For the second one, make a variable named "LINK" and put this for every link script.

IF %LINK = 3 THEN $PAGEID := (page ID) ELSE

LINK := %LINK + 1

 

Conditional linking script not working

8 years ago

It seems $PAGEID is not a valid concept to add to the script. It gives me an error.

Conditional linking script not working

8 years ago

You have to use the page ID number, not the name of the page.

Conditional linking script not working

8 years ago

so if is page 50, I write

$PAGEID := 50

But it is still telling me that the script $PAGEID (just that part) is wrong.

Could it be the $?

Conditional linking script not working

8 years ago

$PAGEID is a constant; you're getting an error because you can't change its value. Try this instead:

$DEST := @P50

Conditional linking script not working

8 years ago

That corrected it. But even having created the variable, it will not recognize the variable  name (not even if I make it a letter long).

I have had trouble with english before, but this is a new level of "pulling off my hair"

Conditional linking script not working

8 years ago
What you're saying doesn't make sense.

When it doubt, post what your entire script is and let us figure it out. Explanations from people that don't know what they're doing, don't get us very far for obvious reasons.

Conditional linking script not working

8 years ago

Oops, guess I'm getting rusty.

Conditional linking script not working

8 years ago
http://chooseyourstory.com/help/articles/article.aspx?ArticleId=106

This article explains it.

Make a variable for their race, and another variable to keep track of how many links they click.

Conditional linking script not working

8 years ago

It finally hit my head and I understood it. Somehow I find it easier to work with advanced variables than with simple ones.

Thanks to all the players that helped me here.