intfiction.org

The Interactive Fiction Community Forum
It is currently Fri Feb 22, 2019 10:38 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Apr 18, 2012 11:22 am 
Offline

Joined: Wed Apr 18, 2012 11:13 am
Posts: 1
I am trying to use a Kind of action (section 7.15 of the manual) with going from certain places (section 7.13) by I seem to keep getting errors. Is this a bug? Is there a better way of doing this?

Code:
Main Street West is a room.  Main Street East is east of Main Street West.

Going west from Main Street West is leaving town.  Going east from Main Street East is leaving town.

Instead of leaving town, say "There is nothing further that way."


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Apr 18, 2012 12:01 pm 
Offline

Joined: Sun Feb 17, 2008 3:51 pm
Posts: 300
A little tricky, but since there is no westward connection from Main Street West, "Going west from Main Street West" is not recognized as a valid action and therefore not able to be categorized as a kind of action. You want to use "in" in this case:
Code:
Going west in Main Street West is leaving town. Going east in Main Street East is leaving town.

EDIT: The code above works, but the reason given isn't correct; even if one adds a valid westward connection, your original code still fails to compile. This does appear to be a hole in the implementation of the compiler's understanding of the whole "going in / from / etc.." when used in conjunction with kinds of action (i.e. a bug which should be reported).

_________________
Skinny Mike


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Apr 18, 2012 12:43 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5568
Location: Burlington, VT
What exactly are the sorts of actions that can be made into kinds of action? Section 7.15 doesn't really say. Going west in [some room] works, and this works too:

Code:
Singing in the northern room is pleasant action.


But it doesn't seem to be "anything you can put in a rule header," because though this works once I've defined weapons as a kind and weapon name as a text that weapons have:

Code:
 Before dropping a weapon when the weapon name of the noun is "sharp dagger", say "If you must..."


this does not work:

Code:
Dropping a weapon when the weapon name of the noun is "sharp dagger" is dangerous action. Before dangerous action, say "If you must..."


Now I can do this:

Code:
Definition: a weapon is pointy if the weapon name of the item described is "sharp dagger".
Dropping a pointy weapon is dangerous action. Before dangerous action, say "If you must..."


but I'm curious to know what I can and can't do here.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Apr 18, 2012 3:09 pm 
Offline

Joined: Wed Jan 19, 2011 3:36 pm
Posts: 101
matt w wrote:
but I'm curious to know what I can and can't do here.


Here's my wild guess: you can't use "when" in a kind-of-action definition, nor can you use action variables via "matched as" (e.g. any of the exotic "going" conditions).


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Apr 18, 2012 8:01 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5568
Location: Burlington, VT
In fact if you try "Singing when in the northern room is pleasing action" you get an error message indicating that you can't use "when" in kinds of action.


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 11 guests


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