Change "on the [supporter]" to "lying down" for the ground?

For my latest IF game, I’ve got a sequence in which the PC is lying down and must get up within a certain amount of time. For the implementation, I created a supporter “ground” and put the character on it when they were lying down.

Waterfall is a room.  "[if the player is on the ground]Blah blah description blah.[else]Blah blah new description blah.[end if]".  The ground is a supporter in Waterfall.  When LobbyFlashback ends, now the player is on the ground.

Unfortunately, this:

doesn’t fit my desired output:

Is there a specific rule I should change to make this work, or should I have a totally different implementation? Basically, I just need the command “get up” to 1, change the location header (no idea if this is what it’s called, but you get my drift) and 2, get a different scene description. Any help would be really really appreciated.

Looks like you need to change the room description heading rule in the Carry out looking rulebooks. The relevant part is the part about the visibility-holder of the actor; here’s a stab:

[code]Carry out looking (this is the new room description heading rule):
say bold type;
if the visibility level count is 0:
begin the printing the name of a dark room activity;
if handling the printing the name of a dark room activity,
issue miscellaneous library message number 71;
end the printing the name of a dark room activity;
otherwise if the visibility ceiling is the location:
say “[visibility ceiling]”;
otherwise:
say “[The visibility ceiling]”;
say roman type;
let intermediate level be the visibility-holder of the actor;
if intermediate level is the ground: [this is the new bit]
say " (lying on the ground)";
otherwise:
repeat with intermediate level count running from 2 to the visibility level count:
issue library message looking action number 8 for the intermediate level;
let the intermediate level be the visibility-holder of the intermediate level;
say line break;
say run paragraph on with special look spacing.

The new room description heading rule is listed instead of the room description heading rule in the carry out looking rules.[/code]

This might be a little hinky, because I didn’t do anything to address the case where you have another supporter on the ground. You probably don’t want to let anything but the player wind up on the ground (except maybe when the player is on the ground); once the player is up, “PUT X ON GROUND” should move X to the location, and anything on the ground should move to the location too. So maybe you’ll never get “Waterfall (on the stool) (on the ground)”. But you might want to deal with it anyway. (Also, I think once you do this you have to implement “PUT X ON GROUND” for every location.)

It looks to me like the code you’ve written to get a different scene description should already be working.

I also wanted to change this sort of thing in crazy ways for one of my WIPs and ended up writing an extension for it. I’ve been sitting on it for a while, but now seems as good a time as any to release it. I’ve submitted it to inform7.com, but in the meantime here’s a direct link:

http://genstein.net/Room%20Description%20Headings.i7x

With this extension you could solve this as follows:

[code]Include Room Description Headings by Erwin Genstein.

Rule for describing the player’s enclosure when the player’s enclosure is the ground: say " (lying down)".
Rule for printing an enclosure description when the described enclosure is the ground: rule succeeds.[/code]

This will only say " (lying down)" when the player is directly on the ground, rather than if the player is on something on the ground. It also will omit " (on the ground)" if the player is on something which is on the ground, so if they’re on a chair on the ground you’ll just see " (on the chair)" not " (on the chair) (on the ground)".

Thanks, Matt! I was trying to figure out which rule was relevant. And yes, the code for the different scene description is working. I was throwing out “things I want in an implementation” in case something other than a supporter was necessary.

I ended up using the extension, which is really great (and simple!) so extra-special thanks to Genstein.

I haven’t checked out your extension yet, but it’s definitely a good thing to be able to customize those messages in some easy way.