ZIL Coding

Surely that should be:

I can’t see any “Learning ZIL” here. :slight_smile:

3 Likes

On a similar note - Is there a way to override the existing library VERB definitions as well? E.G change the V-SING to give a different response (perhaps at random with pick-one) rather than using the default or directly altering the verb.zil library.

Should work like this, unless I’m missing something very very basic:

<SET REDEFINE T>
<ROUTINE V-SING ()
; whatever
>
1 Like

Thanks - I thought I had tried that but I think my redefine was in a file that was inserted before the “parser.zil” file - although that complies with no error the verb routine was still using the one in the library. I have tried again inserting in a file after the parser (& lib verbs) have been inserted and this is now working.

2 Likes

I have hit another snag when setting up an “ask [person] about [object]” scenario. Currently, when using this syntax the parser complains “You don’t see that here” if the [object] is not in scope. Is there a way to allow out of scope objects to be referenced when using ask-about or tell-about?

Not exactly, but you can put your topic objects inside GENERIC-OBJECTS so they’ll always be in scope.

1 Like

Thanks, Jesse,

Global-Objects would then hold the “topic” object. So, for example, I have a global “topic” object called “dog” - and an actual object called “dog”. If the object “dog” is “out of scope” and the player types “take dog” or “put lead on dog” the global-object would be used - how do I prevent that and allow the parser to use the actual object in those scenarios and give a response “I don’t see that here”?

Hi Jesse, I think I have got this working now - I used your suggestion of global-objects and a small parser tweak to allow for the duplicate topic/object scenarios. It’s not the best solution but it is working for what I need to do. Many thank for your help.

I think the simplest way would be to write an ACTION routine that prints that message for every action except asking.

1 Like