Skip to content

Saying Near Something

peterorme edited this page Feb 24, 2015 · 2 revisions

Saying something near a thing.

Defining an action that makes a sound emanate near a specific thing or in a specific room.

Section 1 - Saying something near a thing or in a room

[Note that actions are normally only reported if the player is around, but a general "say" does not behave that way. ]

to say (T - a text) near (X - a thing):
	if the player can see X:
		say "[T]";
		
To say (T - a text) in (R - a room):
	if the player is enclosed by R:
		say "[T]";
		
Section 2 - Demo
	
Cube is a room. "A large room, nearly a perfect cube, with bare concrete walls. The only interesting feature is a ladder leading down."

Basement is down from the cube.

The machine is a fixed in place device in the basement. It is switched on.

every turn when the machine is switched on:
	say "The machine says bzz." near the machine;
	say "There's a buzzing from below" in the cube.

Categories

~ category: Defining Actions ~ category: Actions at a distance ~ category: Short examples

  • [category:All Examples](Categories#All Examples)

Starting Points

testing links

Clone this wiki locally