Blank random statements...

In my games, I have created a number of rooms and situations where there are random statements printed about things happening in the room/region, purely descriptive. It’s always an ‘Every turn’ rule–going something like this–

Every turn while the player is in Office Area: say "[one of]One of your co-workers smacks his lips extra loud, eating at his cubicle.[or]One of the doors in the hallway slams shut.[or]Your neighbor begins hammering on her keyboard.[or][or][or][at random]"

I often add a line of [or]s when I want the program to occasionally say nothing at times (the above example would print something only approximately half the time) while the condition is true. But I notice that a paragraph break is added on, even when nothing is said. How can I prevent this, when the program chooses the blank entry between the [or]s??

Thanks.

You could just say [run paragraph on]:

To say rpo: say run paragraph on.
Every turn:
	say "[one of]One of your co-workers smacks his lips extra loud, eating at his cubicle.[or]One of the doors in the hallway slams shut.[or]Your neighbor begins hammering on her keyboard.[or][rpo][or][rpo][or][rpo][at random]".

There is a room.

Eleas,

that seems to have worked, thanks.

Or you could avoid the issue by using a random chance in the preamble.

Every turn when a random chance of one in two succeeds:
      [etc.]

(This will make it easier to vary the frequency with which the reports get printed, which you may want to do while testing.)

Thanks, jrb. I think I missed that in the manual. If I want it to succeed and print a message about 3 in every 4 moves, would I change that to –

Every turn when a random chance of 3 in 4 succeeds:

…??

Indeed.

Thanks so much. I like that better than all of the [or]s I had to type.