You just set the global but don't read it back (getglobal), but this step isn't necessary if you directly give the 'PlayerSceneTitle' varable a value after setting as global.A question for a scene I'm writing for myself right now...
Background, it is a scene about age roleplay, where the Actor will call the Player 'Daddy' if the Actor's age is under 30.
I'd like to make a one-time check for the Actor's age, deciding the variable for the whole scene that decides what will be displayed in the dialogue.
I tried the following:
In the beginning, after the NPC being Actor has been selected:
If Actor:age < 30
PlayerSceneTitle.setGlobalString("Daddy")
else
PlayerSceneTitle.setGlobalString("Honey")
endif
Then, during dialogue, I tried this:
Actor(Happy):: "Great idea, <PlayerSceneTitle>, I always wanted to see that art exhibition!"
What I get is then:
"Great idea, 0, I always wanted to see that art exhibition!"
Any hints how I do this correctly?
PlayerSceneTitle = "Daddy"
This will be valid through the end of the scene.
(Globals are useful when you use that variable/string through your bunch of scenes, but it's waste using in only one scene. So just think about it, it's necessary or not?)