intfiction.org

The Interactive Fiction Community Forum
It is currently Wed Jun 19, 2013 4:44 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: I7: Moving vs Pushing
PostPosted: Tue Jan 03, 2012 5:06 pm 
Offline
User avatar

Joined: Tue Nov 17, 2009 5:25 pm
Posts: 633
The two verbs "move" and "push" are the same. And I'm quite happy with this 'cause it helps avoiding a lot of trouble.

Though, there is one very special occasion in which the verb "move" should be interpreted differently.

The example, quite straightforward (very SPOILERY!):

Spoiler: show
In Andromeda Awakening, the laser at the end of the game can be pushed to fire, but if a player wants to MOVE it to point it somewhere else, the laser... just fires.

Is there a way I can catch the "move" verb in just ONE occasion?

Thanks a lot for the help!


Top
 Profile Send private message  
 
PostPosted: Tue Jan 03, 2012 8:08 pm 
Offline

Joined: Mon Oct 11, 2010 1:27 pm
Posts: 473
Note--this code was not tested to compile, etc., but I hope it gives the general idea.

Don't you want to push

Spoiler: show
a button on the laser instead?


If so, see code below.

Spoiler: show
the button is a thing. the button is part of the laser.

understand "laser button" and as button.

does the player mean pushing the laser button: it is very likely.

instead of pushing the laser:
say "Maybe you want to push the button on the laser? The laser gun is too bulky to move."


Otherwise, here's my guess. But it seems awkward.

Spoiler: show
moving is an action applying to one thing.

understand the command "move [something]" as something new. understand "move [something]" as moving.

carry out moving:
if the noun is not the laser:
try pushing the noun instead;
say "Which way do you want to move the laser?" instead;

moving to is an action applying to one thing and one direction.

understand the command "move [something] [direction]" as something new. understand "move [something] [direction]" as moving.

carry out moving (a - a thing) to (b - a direction):
if noun is not the laser:
say "Pick it up instead." instead;
if nowhere is second noun of the location of the player:
try going b instead;
move player b;
move laser b;


You could also
Spoiler: show
pull a trigger.


Top
 Profile Send private message  
 
PostPosted: Wed Jan 04, 2012 3:45 am 
Offline
User avatar

Joined: Tue Nov 17, 2009 5:25 pm
Posts: 633
Thanks Andrew.
The second example, although to be tested, seems to better fit my needs.
Spoiler: show
I want the laser to fire no matter what the player decides to push, pull, move etc, so it's better i leave it a single object.
Will try both, anyway.


Top
 Profile Send private message  
 
PostPosted: Wed Jan 04, 2012 5:45 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 898
If you make a grammar line that has a token that's more specific than [something], the more specific grammar takes precedence. But because "move" is a synonym for "push", you also need to remove that definition and re-understand it as normal pushing (and, if you need it, pushing between rooms).

Code:
The city is a room. An apartment is a kind of thing. The home is an apartment. It is in the city. The park is in the city.

Apartment-moving is an action applying to one visible thing.

Understand the command "move" as something new.
Understand "move [something]" as pushing.
Understand "move [something] [direction]" as pushing it to.
Understand "move [apartment]" as apartment-moving.

Report apartment-moving:
   say "You move [the noun]."

Test me with "actions on/push park/move park/push home/move home".

_________________
Vorple UI libraryBeta testing siteBlog


Top
 Profile Send private message  
 
PostPosted: Wed Jan 04, 2012 6:05 am 
Offline
User avatar

Joined: Tue Nov 17, 2009 5:25 pm
Posts: 633
Juhana wrote:
If you make a grammar line that has a token that's more specific than [something], the more specific grammar takes precedence. But because "move" is a synonym for "push", you also need to remove that definition and re-understand it as normal pushing (and, if you need it, pushing between rooms).

Very nice! That's it!
Thank both a lot!


Top
 Profile Send private message  
 
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 0 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