Introducing a New Character

Hey guys, I’m now at the stage where I want to introduce a new character the player can interact with. I was looking through the guide, but I can’t find what I want. I want the player to be able to both interact and speak with the new character, let’s call him the hermit. Can you help me? Thanks!

There’s a whole chapter on creating characters in my Handbook (www.musicwords.net/if/i7hb.htm). You might want to check it out.

Thanks Jim Aikin :slight_smile: I’ll check it out right now.

OK, I think i’m doing something wrong here. I managed to add a character, but I can’t seam to get the dialogue on page 158. Here’s the code I used just to test it.

[code]Talking to is an action applying to one visible thing. Understand “talk to [someone]” or “converse with [someone]” as talking to.
Check talking to: say “[The Hermit] doesn’t reply.”

1Instead of talking to the Hermit: say “[one of]‘Hi, there,’ you say confidently.[paragraph break]‘What’s happening?’ he replies casually.[or]‘I’ve been meaning to ask you about that tuxedo,’ you comment. ‘Where did you get it?’[paragraph break]‘My tailor is quite exclusive,’ Hermit replies, inspecting his cuff. ‘He would never consent to clothe riffraff like you.’[or]‘You really are a stuck-up snob, aren’t you?’ you say hotly. [paragraph break] Hermit laughs heartily. ‘I was just yanking your chain. I bought it at Macy’s for $60 at a clearance sale. I’ll give it to you if you like.’[or]You decide against talking any further with Hermit right now.[stopping]”.
[/code]

Is it the punctuation or something? Thanks mate :stuck_out_tongue:

Looks like a typo - you have “1Instead” instead of “Instead”. It works for me when I take out the 1.

Also, if you introduce other persons to talk to besides the hermit, there will be a problem with:

Check talking to: say "[The Hermit] doesn't reply."

Any time the check talking to rule runs, it will tell the player that the hermit doesn’t reply, regardless of whom the player actually talks to.
(Make it Check talking to: say "[The noun] doesn't reply." instead…)

You might also want to check out some of the conversation extensions, rather than starting from scratch.

Robert Rothman

Thanks guys! Would it also work if I took away the check rule or does the check has to be there?

It should work without the check rule if there are no other NPCs besides the Hermit, but you might also want to add this (just for fun):

Instead of talking to the player, say "You babble senselessly to yourself."

Since the player is “someone”, the code as currently written would allow you to talk to yourself (aka the player). If the Hermit and the player are the only persons in the game, then the two instead rules cover everything, and the check rule is pointless.

Also you might consider adding this:

Instead of answering the hermit that "hello/hi", try talking to the hermit.

That should allow the player to say HERMIT, HELLO or HERMIT, HI instead of TALK TO HERMIT if they prefer.

LOL I’ll try that for fun trojo. And would someone be so kind to tell me what I left out or added in this so it doesn’t work? It’s the same code as before, but as a different conversation:

Talking to is an action applying to one visible thing. Understand “talk to [someone]” or “converse with [someone]” as talking to.
Check talking to: say “[The noun] doesn’t reply.”

Instead of talking to the Hermit: say "[one of]'Hi,' you say unsure of yourself.[paragraph break]'Well, well, well, look at what the monkeys draged in?' he said with a glint of amusement in his eyes.[or]'Who are you? What do you want from me?' you stammered looking around like a trapped animal. [paragraph break]'No worries my little friend. Rest asure that I mean you no harm. I'm simply a lonely man who longs for company ever so often,' the Hermit repliedas he continued scutinizing you. [paragraph break] Hermit finally sat down on one of the chirs and gestured for you to do so as well. 'Now, holw may I help you young fellow?'[paragragh break] 'Your help, yes.' you said the words tripping over eachother. You're not sure if you can trust the man. 'Sorry sir, I forgot to ask you your name. Will you tell me?'[paragraph break] 'Me?' The Hemit laughed softly, it was deep and smooth. 'You can call me the Hermit. Yes, I like this name. Now, how can I help you?[paragraph break] 'I need to get home, some how, some way. I don't know how I got here.' your voice slighty higher than usual as you remembered what you were supposed to be doing.'[paragraph break] 'Ok, I'll help you.' the Hermit looked at the dying fire in the corner, 'Go west, back into the deep of the forest and I'll help you, bring you to my ship once the fire is satisfied.'[or]you decide to start the quest for the right type of firewood. As you turned to head out the hut, you felt the intense blue gaze burning into your back and decide to hurry before the Hermit would change his mind of providing aid. You decide not to keep talking to the Hermit now.[stopping]".

Thanks guys :stuck_out_tongue: sorry bout this.

Misspelled one of the [paragraph break]s

EDIT: Also (though I realize this is an early draft or a random example that isn’t even in your actual game), you’ll want to avoid switching between present tense and past tense in your writing. It is much easier to write IF all in present tense so I’d just go with that.

trojo thanks a honored time! That did the trick :slight_smile: Thanks again!

These kind of typos are not hard to debug yourself. If you read the error message, it says:

It’s telling you what the problem is and which phrase is misspelled.

The game is working now. Thanks Jim Aikin, gravel, Felix, Robert Rothman, trojo and Juhana for all your help. :slight_smile: