I found the problem! I was using a text string to match the askForTopic instead of a game object.
While that was easy enough to fix, the problem remains with the way the game deals with askFor and give topics, I can add a check to the askForTopic to see if she has the object and give a suitable response.
I thought that when you use format ‘lady, give me object x’ it would be treated as a command and give the default response ‘she refuses your request’, or am I expecting too much from the library?
Start Room
This is the starting room.
You see an object x, a dummy, and an object z here.
The lady is standing here.
hello
Hello!
lady, take dummy
The lady refuses your request.
lady, take object x
The lady refuses your request.
lady, take object z
The lady refuses your request.
lady, give me object x
No, you gave me this!
lady, give me object z
I’m sorry, but I have no idea what you are talking about.
lady, give me dummy
dummy askfor topic response.
give her object x
(first taking the object x)
Well! thank you very much!
give her object z
(first taking the object z)
No thank you.
give her dummy
(first taking the dummy)
No thank you.
ask for object x
No, you gave me this!
ask for object z
I’m sorry, but I have no idea what you are talking about.
ask for dummy
dummy askfor topic response.
[code]#charset “us-ascii”
#include <adv3.h>
#include <en_us.h>
versionInfo: GameID
IFID = ‘0215fb68-ce0f-9d81-a32e-d537ee51a875’
name = ‘Your New Game Title’
byline = ‘by Your Name’
htmlByline = ‘by
Your Name’
version = ‘1’
authorEmail = ‘Your Name your-email@host.com’
desc = ‘Put a brief “blurb” about your game here.’
htmlDesc = ‘Put a brief “blurb” about your game here.’
;
gameMain: GameMainDef
initialPlayerChar = me
;
startRoom: Room ‘Start Room’
"This is the starting room. "
;
-
objectX : Thing ‘object x’ ‘object x’
;
-
objectY : Thing ‘dummy’ ‘dummy’
;
-
objectZ : Thing ‘object z’ ‘object z’
;
-
me: Person
;
ladyFraser : Person ‘lady fraser’ ‘lady’ @startRoom
“lady fraser desc”
isHer = true
;
-
DefaultAskTellTopic, ShuffledEventList
[
‘Really? Well I am rather busy…’,
'You seem to find ’ + gTopicText + ’ very interesting… ',
‘Yes well… whatever…’
]
;
-
AskForTopic @objectY
"dummy askfor topic response. "
;
-
AskForTopic @objectX
"No, you gave me this! "
;
-
GiveTopic @objectX
topicResponse
{
"Well! thank you very much! ";
objectX.moveInto(ladyFraser);
}
;
-
DefaultAskForTopic
"I’m sorry, but I have no idea what you are talking about. ";
;
-
DefaultGiveTopic
"No thank you. ";
;
-
fraserTalking : InConversationState
nextState = fraserWaiting
;
++ fraserWaiting : ConversationReadyState
isInitState = true
;
+++ HelloTopic
"Hello! ";
;
+++ ByeTopic
"Goodbye. ";
;[/code]