Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

How to replace variable. Is that even possible?

9 years ago

For example, if at the beginning you could choose brown or blond hair, then later in the story it mentioned you had ___ hair. Can you replace the ___ with whatever you chose at the beginning? Is it possible?

I was going to use this for names.

How to replace variable. Is that even possible?

9 years ago

Yeah. For the hair example, you could have a %HAIR variable with values of 0 for brown and 1 for blond, and on the page put %%HAIR%=%0%brown%%%%HAIR%=%1%blond%%, and it'll display the corresponding hair color. Names are more complex, but most commonly accomplished by either having a single variable for multiple preset names (the easier option), or n variables for each letter of an n-digit name.

How to replace variable. Is that even possible?

9 years ago

I can see how the latter would be complicated, but yeah, I was going to stick to preset names. Thanks!