WatchNon-threaded

Forums » Advanced Editor Forum » Read Message

Talk about it. Ask for help on it. Compliment it.

Genders

one month ago

Is there a way to have a variable for gender and use that to change he or she?

Genders

one month ago

Yes, but I will say that it isn't necessary for the stories here. Superficial customization is fine and all, but if the only difference is literally a couple of pronouns it probably shouldn't be a top priority.

However, you know what type of storygame you're trying to make better than I do, and it isn't like there is anything inherently wrong with having a gender choice even if it only changes the pronouns, just know that there are other options if you don't want to implement it.

Anyway, implementing it is easy enough, just have a reader choice with two (or however many) links that lead to the same page. Then make a variable, say %GENDER. Then for each link have it set %GENDER to a different number.

When you want to reference the character you can use on-page scripting, which is basically this:

%%GENDER%=%1%Male%%

It shows text (in this case 'Male') if the condition is met (in this case %GENDER == 1).

Note that if you have the RTE (Rich Text Editor) turned on, then you'll want to turn it off (check profile settings) or put the script in with the source button. Note that the RTE causes many issues with a number of things, and if you are going to have on-page scripting I'd heavily advise that you turn it off.

As for what those %'s signs mean, basically you start with 4:

  • %%%%

Then in the middle put the variable name.

  • %%GENDER%%
  • (Note this can be used to display the variable value in the story if left as is)

Then you add the check, like this:

  • %%GENDER%=%1%%

And finally the text that will display.

  • %%GENDER%=%1%text to show%%

In order to check multiple variables (which is what you want to do here) you would add on additional checks, you can do it separately but if you combine them you won't get blank lines in your storygame where the conditions weren't met.

Basically do this:

  • %%GENDER%=%1%Male%%GENDER%=%2%Female%%

I think this is the simplest way to do it, but I'm not the best at explaining this stuff, so do speak up if what I wrote is indecipherable / not working. Someone else will probably have more luck explaining it. But hey, maybe it does make sense!

P.S. There is more you can use variables & scripting for, reading the articles in the Help & Info section is a good idea if you want to get a better understanding. Here is an article that uses the same concepts as what is used for a gender choice: http://chooseyourstory.com/help/articles/article.aspx?ArticleId=3850, it might make more sense than what I wrote so do take a look.

Genders

one month ago
We have variables, so yes. But also everything Zake said. ( I have a whole thread about creating a gender options specifically a little down the page from this one that could've just been linked to, but Zake likes to type...)

Genders

one month ago

Beats typing my own original works. xd

I was wondering where that article went, as I was considering linking it, but couldn't find it. No surprises there, as it was never an article, but a thread!

Link to thread.

Genders

one month ago
Genders? That's so 2000 & 18 LOL...