Damn, I wish I could figure this outâŚ
I have the code pasted below working in the game. It is a modification of the Identity Theft example that I was shown earlier.
I have tried for the past few hours to add one more question which I would hope would have been simple to ask their age.
I have tired modifying the name code to only one word and also adding a variable for the age field, nothing seems to work. The original merged code from Identity Theft does work.
Could anyone be good enough to give me a hint on what I should be doing, I donât mind trying to figure it out but just need a slight pointer in the right direction. I am not a coder, so what is obvious to some, may not be that obvious to me!
Thank you.
[code][Do Character Setup]
When play begins:
say âShould your character be male or female? >â;
if men win, now the player is male;
otherwise now the player is female.
To decide whether men win:
(- Question('male','M//','man','female','F//','woman') -)
Include (-
[ Question pos1 pos2 pos3 neg1 neg2 neg3 first_word_typed;
while (true) {
VM_ReadKeyboard(buffer, parse);
wn = 1; first_word_typed = NextWordStopped();
if (first_word_typed == pos1 or pos2 or pos3) rtrue;
if (first_word_typed == neg1 or neg2 or neg3) rfalse;
print "Please choose ", (address) pos1, " or ", (address) neg1, ". > ";
}
];
-)
The playerâs forename is an indexed text that varies.
The playerâs full name is an indexed text that varies.
When play begins:
now the command prompt is "What is your name? > ".
To decide whether collecting names:
if the command prompt is "What is your name? > ", yes;
no.
After reading a command when collecting names:
if the number of words in the playerâs command is greater than 7:
say â[paragraph break]Some people like long names, others donât. This game falls into the not liking long names camp! Please try again.â;
reject the playerâs command;
now the playerâs full name is â[the playerâs command in title case]â;
now the playerâs forename is word number 1 in the playerâs full name;
now the command prompt is â>â;
clear the screen;
say â[banner text]â;
move the player to your bed;
reject the playerâs command.
Instead of looking when collecting names: do nothing.
Rule for printing the banner text when collecting names: do nothing.
Rule for constructing the status line when collecting names: do nothing.
The letter is in the apartmentkitchen. âA letter has been left on the floor.â.
The description of the letter is âDear [playerâs forename], [paragraph break]This letter confirms that your mortgage is now two months in arrears and you need to make arrangements to pay the outstanding debt.[paragraph break]Please call us on Hyde 2612 and ask for [if player is male]Frank Morgan and he[end if][if player is female]Francis Morgan and she[end if] will be able to assist. [paragraph break]You will need to quote âg/3n/3-[playerâs full name]â as a reference.[paragraph break]Failure to call us within 7 days will result in legal action.[paragraph break]Yours sincerley,[paragraph break]Hyde Mortgages.â.
Instead of examining the player when the player is female:
say "Probably best for people in your condition to sit down when you go to the toilet."
Instead of examining the player when the player is male:
say "Your the kind of person that always leaves the seat up."
[/code]