I want to make a large book that the player can carry around and stand or sit on. I have made it a portable enterable supporter.
You also need to know that elsewhere in my source (to make beds enterable) I have the line: Understand “lie in/on/upon [something]” as entering.
My problems are:
The game will accept ‘stand in’ as well as ‘stand on’, and gives messages such as ‘You can only get into something free-standing.’ How can I make the book ‘on’ only?
I don’t want the player to be able to ‘lie on’ the book. How can I make it an exception to my ‘lie on’ rule?
When my player is on/in the book and inputs ‘get down’, the game crashes, complaining about a complicated clash of rules.
All help much appreciated, many thanks for reading.
When you define “lie in/on” and “stand in/on” to all be the Entering action, you are deciding to treat them all as synonyms. (It’s possible to distinguish the words that went into the action, but it’s hacky.) Note that the library already defines “get in/on” as entering, so this decision is partially made for you already.
The clean way around this is to define a new action, perhaps Climbing Onto, and have “get on” and “stand on” refer to this action instead. It sounds like you’d actually need a third action for “lie on”. Then you can catch these and redirect them to Entering when appropriate – say, for a bed – but have a custom message for the book.
Unfortunately, splitting up the predefined “get” grammar is kind of a nuisance, since so many different actions start with this word. If it’s what you want to do, I can go into more detail.
As for (3), I’m not sure what you’re doing. I made a test game with a portable enterable supporter object, and I can get onto and off of it. (When it’s on the floor.)
You may want to try using Postures by Emily Short. It allows standing on something, lying on something and sitting on something to be defined as three separate actions.