Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

How do I identify the position of the preposition?

A topic by Garry Francis created Jun 16, 2020 Views: 68 Replies: 2
Viewing posts 1 to 2
Submitted (1 edit)

Consider the following commands:

PUT ON JACKET

PUT JACKET ON TABLE

In the first example, the preposition follows the verb so that the resultant action means 'wear'.

In the second example, the preposition follows noun1, so that the resultant action means 'place'.

Given that there is only one test for the preposition (preposition_is), how do I distinguish between the position of the preposition in the first and second examples? Or is this impossible?

Host

I'm going to dodge the question.

Adventuron has a certain number of language-specific sentence pre-processors (undocumented of course).

For English:

  • "PUT ON" will map to "WEAR"
  • "PUT DOWN" will map to "DROP"
  • "PICK UP" will map to "GET"
  • "TAKE OFF" will map to "REMOVE"
  • "LOOK AT" will map to "EXAMINE"
  • "AND THEN" will map to "THEN"
  • "GO <direction>" will map to "<direction>"

e.g. "PUT ON THE COAT AND THEN GO TO THE NORTH." -> "WEAR COAT. NORTH"

Back to your question - you (currently) can't. I'll think about the issue some more. And I'll consider exposing the pre-processor to authors (for them to add their own mappers).

Submitted

Thanks. That's what I suspected. I didn't know about all the mappings. I think you've mentioned one or two of them before. LOOK AT is mentioned in the doco.

I was also wondering how to implement LOOK UNDER (as in "look under the rug") and LOOK THROUGH (as in "look through the window"). LOOK is a synonym for EXAMINE, but EXAMINE UNDER and EXAMINE THROUGH are a bit dubious. I suppose I could use a test like:

: if (original_verb() == "look" && preposition_is "under")

Anyway, it's overkill for now, so I'm just going to ignore those possibilities.