Forum Discussion
IvanDzurek-e393
8 months agoCommunity Member
text variable within another text variable
Hello. In my course I'm doing a choose-your-own-adventure style conversation. A user gets choices A and B and depending on what they click, a variable will be filled with an answer and displayed wit...
IvanDzurek-e393
8 months agoCommunity Member
I asked chatGPT to help and it made a javascript that strings it all together. Works fine like this.
var name = GetPlayer().GetVar("Name");
var callChoice1 = "some text and " + name + " here";
var player = GetPlayer();
player.SetVar("callChoice1", callChoice1);
- JudyNollet8 months agoSuper Hero
Yes, JavaScript can be used for that sort of thing. I'm sorry I neglected to mention that in my previous response, which was based only on what can be done with Storyline triggers.