Hi folks, I’m relatively new to coding and using twine and I’ve hit a brick wall with an Idea I want to impliment.
I want to impliment a system that generates a random ID tag for the player that will be used to address them throughout the story. I want the player to be able to input their own name (probably using the prompt macro) and then be assigned a randomised 4 digit number. The outcome I’m trying to achieve is something like this, player inputs the name Joe Bloggs and is given the ID tag of JB1234.
I suppose what I am struggling with is how to only assign the names initals to the ID and not the rest of the name. And also saving it as a variable that can be used throughout the story without the numbers changing every passage. I’m also using Harlowe to write the code.
Apologies if I am asking a simple question but I have little experience in coding and my research hasn’t resulted an answer.
Thanks in advance!