intfiction.org

The Interactive Fiction Community Forum
It is currently Mon Nov 20, 2017 2:50 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Jul 03, 2017 6:16 pm 
Offline

Joined: Mon Mar 13, 2017 3:26 pm
Posts: 14
Hi all,

I'm learning ZIL with help from Jesse McGrew. It's going ok, not the big scary language it's gained a rep for!

I'll be sharing my learning soon in the form of *.zil files which will make life easier for anyone wishing to follow in these foot steps. However I am very much the Learner at this stage, and with this in mind i'm hoping to find other people who may be familiar with the code?

I'm trying to implement VERBS that allow the player to ask questions to NPCs (Actors) in the same way that was done in the detective games that Infocom released. It's a non-standard thing so needs to be created and added, i'm nearly there I think - i've created a new zil file called verbs_plus with the code shown below but currently it errors.

If anyone can spot any mistakes in the code then please point them out! Thank you! Adam.


"Verbs Plus"

<SYNTAX ASK OBJECT (FIND PERSONBIT) ABOUT OBJECT = V-ASK-ABOUT>

<ROUTINE V-ASK-ABOUT ()
<TELL CT ,PRSO " doesn't seem to understand. 'Sorry, ask me that again please?'." CR>>

<SYNTAX OBJECT (FIND PERSONBIT) TELL ABOUT OBJECT = V-TELL-ABOUT>
<VERB-SYNONYM WHAT HOW TALK>

<ROUTINE V-ASK-ABOUT ()
<TELL CT ,PRSO "'Sorry, ask me that again please?'." CR>>


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Jul 03, 2017 6:17 pm 
Offline

Joined: Mon Mar 13, 2017 3:26 pm
Posts: 14
lol - i tried to attach my verbs_plus.zil file to this post and it rejected it saying ".zil file types not allowed" ..... the irony!! :D


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Jul 03, 2017 6:35 pm 
Offline

Joined: Mon Mar 13, 2017 3:26 pm
Posts: 14
Update::

This code works!

<SYNTAX OBJECT (FIND PERSONBIT) TELL ABOUT OBJECT = V-TELL-ABOUT>
<VERB-SYNONYM WHAT HOW TALK>

<ROUTINE V-ASK-ABOUT ()
<TELL CT ,PRSO "'Sorry, ask me that again please?'." CR>>


So.... It's the syntax for "Bob, tell me about foo" that I need help with.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Jul 04, 2017 7:28 am 
Offline

Joined: Mon Mar 13, 2017 3:26 pm
Posts: 14
Think we're getting there.... this compiles without error ..... but will it implement "Bob, tell me about foo" ??

<SYNTAX ASK OBJECT (FIND PERSONBIT) ABOUT OBJECT = V-ASK-ABOUT>
<ROUTINE V-ASK-ABOUT ()
<TELL CT ,PRSO " doesn't seem to understand. 'Sorry, ask me that again please?'." CR>>

<SYNTAX TELL ABOUT OBJECT = V-CHAT-ABOUT>
<SYNONYM TALK WHAT HOW CHAT>
<ROUTINE V-CHAT-ABOUT ()
<TELL CT ,PRSO "'Sorry, ask me that again please?'." CR>>


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group