Problem with varying description of thing

Hi, I have a newbie question. I have a room, Warehouse Entrance, and a thing, a football. I want the football to randomly be either not there, on the ground, or in the air when the player enters the Warehouse Entrance. I feel like I’ve tried 100 different ways to phrase this, but I just can’t get it to work. When the football isn’t there, I want it to be hidden or off-stage so the player can’t see it or interact with it, and when it’s on the ground or in the air I want a different description of it to appear in the opening description of the room.

I know how to vary the description of a thing, but I can’t get the hidden/not hidden part to work with that, and I’m also not sure how to get decision on whether its hidden to execute when the player enters the room. I have the hidden items extension installed.

I hope that makes sense! Any help would be greatly appreciated. :slight_smile:

To do something every time the player enters a room, use a “Carry out going to …” rule. (This shouldn’t print anything or stop the action, just set up state.)

So like this:

The Connector is a room.

Warehouse Entrance is south of the Connector.

The football is a thing.
The football can be airborne.

Carry out going to the Warehouse Entrance:
	if a random chance of 1 in 3 succeeds:
		now the football is off-stage;
	else:
		now the football is in Warehouse Entrance;
		if a random chance of 1 in 2 succeeds:
			now the football is airborne;
		else:
			now the football is not airborne.

Check taking the airborne football:
	instead say "It's way out of reach."

Rule for writing a paragraph about the football:
	if the football is airborne:
		say "A football is zooming about overhead.";
	else:
		say "A football is lying in the dirt."

We handle hidden by taking the football off-stage, which is much easier than trying to make it invisible and not-referrable-to. Then we have an “airborne” property, which can be set or not.

This is just a start, of course. It’s missing all sorts of cases (like “touch football” when the thing is airborne), and it also has the odd result that if you do pick up the football and walk around with it, the game will silently snatch it out of your hands.

Thank you! That’s exactly what I was looking for.