Override "STAND = OUT" in Inform 7

Continuing the discussion from Stand = out?:

I came across a similar situation in a game I’m writing, in which an understandable reaction to “falling off” a chair is to type “STAND” (to get up off the floor) but it made the player exit the location. It wasn’t necessary to allow the player to “EXIT” the room so I got rid of that. But I’d still like to change the STAND action, and the following seems to work… but might there be any unintended consequences?

Understand the command "stand" as something new.
Understand "stand" and "stand up" as standing.
Standing is an action applying to nothing.
Carry out standing:
	if the player is in a container or the player is on a supporter:
		try exiting;
	otherwise:
		say "You're standing already."

Thanks.

3 Likes

Looks fine to me - only thing that occurs to me is that depending on what you’ve got in your game you might consider whether to include vehicles as well.

1 Like

The standard rules include

Understand "stand on [something]" as entering.

This is only rarely useful in a way that players will try, but you might want to put it back in, depending on your game. (I guess STAND ON CHAIR and STAND ON MAGIC CARPET are the cases most likely to turn up in IF scenes.)

2 Likes

I think a vehicle is a kind of container, so the existing code works.

This seems to bring that back:

Understand "stand on [something]" as standing on.
Standing on is an action applying to one thing.
Carry out standing on:
	try entering the noun.

It seems a bit strange that to stand on a container would enter it, but I guess it would depend on what’s in the game (a boat? a lake?)

I suppose this all demonstrates your earlier point…

1 Like