I’m doing okay when it comes to learning the language, but I can’t wrap my head around how to allow players to input both a first name and a surname while having them display on the same line in the stats screen. I don’t really want to just offer the name choices as that would defeat the purpose in my view. I can, however, get the text to alter when it’s a single variable that’s being tweaked.
I have the text setup right at the start, so when you look on the stat screen, it says ‘Name: John Doe’ which I’ve done by using this code in the startup text:
*set firstname “John”
*set surname “Doe”
*set Name (“John”&" ")&“Doe”
But when I ask players to input their first name, with ‘*input_text firstname’ and ‘*input_text surname’, John Doe never changes to correspond to the player’s inputs.
When it comes to having the text change for just one input, I can get that working fine. I’m beginning to think I should just let players enter their first name.
Any help, please, as I’ve seen that it can be done? (And I’ve tried various combinations of ‘*input_text ${firstname}’ too. Nothing’s working and I’ve gone through the tutorials.)
Edit: Oh right, thanks. I’ll quickly try what you suggested in the edit. And I think I missread, unless the ‘Then on the stats screen, just use:
${name}’ was added later. Playing catch-up. Kinda rushing about as I’ve been trying for hours to get it working. I just want to move on with the story.
Also i recommend you use variables without capitals could cause LOT of errors ,i know with modern version you can but with oldies you even couldnt is really easy write name instead Name in variables.
Well, no matter what I do, with or without capitalisation, it’s not saving the inputted text for the stat screen. At this point, I’m about to give up and just let players enter the first name, while having the surname on a separate line. That or I’m just going to get very frustrated.
Edit: Actually, I could have the player input the surname too. It’ll just be on a different line. It’s just that it’s not going to look as nice as it would on the same line.
Edit 2: There we go. The text is now changing, but the first name and surname are on separate lines.
@DavidGil
I too am having this problem and would like to know how you finally got it figured out here is my startup
*create firstname “”
*create surname “”
*create name “”
*create Age “”
*create Wealth “”
*create Income “”
*create rank_name “Civilian”
*set name (firstname&" ")&surname
Later I have the player choose from one of five names or input their own which works fine, however it will not show firstname and surname as one name in my stats which look like so…
*stat_chart
text Name
text Age
text rank_name Rank
text Wealth
text Income
PS: Where you have “” in the code for wealth etc., it’s not needed. Just go with the number 0 or whatever you want the starting value to be. You don’t really need it. I can see why you’d have possibly have it for age and rank though.