Ask/Tell Problems...

TextingStories
07 Jun 2012, 06:44
Ok, so I am back into making the Text Game and I want, lets say a soldier, who is already in the room, to be able to be asked questions. I tried using the tutorial and searching both in the tutorial webpages as well as this forum and I can not find my answer. I am assuming the answer is simple, but it is beyond me. Can some one hold my hand please and explain what I have to do to make this work?

In the tutorial it says I have to make an "If" command for "alive". (That was for Bob, because originally he was dead.) But my soldier is not dead nor ever will be dead, at least not for right now. Regardless, I typed "alive" just to check and also used ["If" "object is visible" "object" "soldier"] and also ["If" "player is in room" "object" "soldier"], but that does not work either. It says to "Add" random subjects, so I put "age", "weight", "name" etc., but when I say "ask soldier name" or "ask name" it says "I don't understand your command." or when "soldier" is highlighted on the 'Places and Objects Screen" to the right of the game "speak to" is available, but when I click it it just says "She says nothing". (I made the soldier a female.)

Is there commands or verbs I was suppose to create before hand to all this or is the "ask/tell" suppose to be so simple I am missing something? I even tried to use just "print message" since I did not want any kind of restraint to begin with, but nothing. Also I have played some games where if you click on the NPC the available questions are there to be clicked. How do I make those? Thank you.

Pertex
07 Jun 2012, 07:57
I don't understand what you want to do, so could you post your gamefile?

AvecPardon
07 Jun 2012, 17:49
It's the way the Ask/Tell is set up. It's not very 'natural' when it comes to commands.

Ex/ We want to ask the soldier his name, so naturally we type 'Ask soldier name'. But this gives us a 'do not understand' return. If you look at the tab for ask/tell, you can see it says 'ask about'.

So you need to type 'Ask soldier about name' or 'Ask about soldier name' in order to get the proper response. It's less intuitive and kind of clunky, which makes the interaction a bit wooden, but at least it works now. Other than editing the Core for it, which I'm afraid of doing without breaking it. XD

Pertex
07 Jun 2012, 20:40
If you want to change it you must copy the english.aslx to your gamedirectory and edit it with an external texteditor. Find the line
<template templatetype="command" name="ask"> and change it this way:

<template templatetype="command" name="ask"><![CDATA[(^ask (?<object>.*) about (?<text>.*)$|^ask (?<object>.*) (?<text>.*)$)]]></template>

TextingStories
08 Jun 2012, 02:11
AvecPardon wrote:It's the way the Ask/Tell is set up. It's not very 'natural' when it comes to commands.

Ex/ We want to ask the soldier his name, so naturally we type 'Ask soldier name'. But this gives us a 'do not understand' return. If you look at the tab for ask/tell, you can see it says 'ask about'.

So you need to type 'Ask soldier about name' or 'Ask about soldier name' in order to get the proper response. It's less intuitive and kind of clunky, which makes the interaction a bit wooden, but at least it works now. Other than editing the Core for it, which I'm afraid of doing without breaking it. XD


And I have to type the message the soldier will reply with, including the soldier is replying back as in [soldier replies back, "I am 22."] The game does not automatically put [soldier replies back,]. Other wise the response just looks like ["I am 22."]. Is there a way around that?

And thanks for the code Pertex. Will Word Pad work?

Also how do I get it where if you click on the soldier the appropriate questions can be clicked on and asked?

Alex
08 Jun 2012, 11:12
You shouldn't need to copy the english.aslx file, you should be able to copy just that specific template within the editor to modify it.