Change text with variables


#1

How would I go about changing the text in a game depending on the character’s variables? I don’t just mean words like “he” or “she”, I mean large chunks of text.

For example, if I wanted the game to say, “Oh Christopher, I’m so proud to hear that you want to take on the family business!” if the main character is a man, but have it say, “You want to take on the family business? But Christina, everybody knows that the manufacturing of rubber chickens is a man’s job!” if the main character is female, how would I do that? :blush:


#2

Basically

*if male
    "Oh Christopher, I'm so proud to hear that you want to take on the family business!"
*if female
    "You want to take on the family business? But Christina, everybody knows that the manufacturing of rubber chickens is a man's job!"

I’ve a simple tutorial here


#3

Oh really? It’s that easy? Sorry, for some reason I thought that only applied to choices and not to text in the game. Thanks @FairyGodfeather! :blush:


#4

I had such huge difficulties wrapping my head around ifs in the first game I made. :slight_smile: It gets easier. You can use ifs about anywhere, and even nest them or have multiple conditions.


#5

*hidden inside a cloak, silently slip a letter to @Avery_Moore’s pocket