OOC:Enterable Objects

Making enterable objects (i.e.: furniture).

Contents

The Basics

Let's say you want to make a booth for a restaurant. First, you want to create the object.

@create Booth

Make sure to give it a description and set the appropriate flags!

@desc Booth=A booth-table meant for four.
@set Booth=enter_ok

The second command allows people to go into the booth by typing 'enter booth'.

You can make it so people have a better idea of what the object is when they are inside of it.

@idesc Booth=The booth seems to be able to fit four people comfortably. It looks like there's menus in it.

You might also want to customize the entering and leaving messages of your object.

@oxleave Booth=climbs out of the booth.
@oxenter Booth=slides into the booth.
@oenter Booth=joins you inside the booth.
@oleave Booth=gets out of the booth.
@enter Booth=You slide into the booth.
@leave Booth=You get out of the booth.

As a note: 'ox' messages are shown to people OUTSIDE the object. 'o' messages are shown to people INSIDE the object. Plain messages are shown to the person doing the entering/exiting.

I Can Hear You!

If you want to make it so you can hear people to the outside of the booth, do the following:

@listen Booth=*
@inprefix Booth=From the Restaurant,

The @inprefix can be customized. It's placed before every pose, emit, or say that comes from outside the booth. You must be inside the booth to see the @inprefix.

We Can Hear You, Too!

If you want to make it so people outside the object can hear the people inside the object, do the following:

@set Booth=audible
@prefix Booth=From inside the booth,

Like the @inprefix, the @prefix can be customized. It is placed before every pose, emit, or say that comes from inside the booth. You must be outside the booth to see the @prefix.

Put it all together

Using general code format: (As a note, things in <> must be replaced by what you want. So <Object Name> should be replaced by Car if you're making a car.)

@create <object name>
@desc <object name>=<description of object>
@set <object name>=enter_ok
@set <object name>=audible
@listen <object name>=*
@prefix <object name>=<prefix for outside people seeing inside interactions>
@inprefix <object name>=<prefix for inside people seeing outside interactions>
@idesc <object name>=<description of the inside of the object>
@oxleave <object name>=<message seen by the outside when someone leaves the object>
@oxenter <object name>=<message seen by the outside when someone enters the object>
@oenter <object name>=<message seen by inside when someone enters the object>
@oleave <object name>=<message seen by inside when someone leaves the object>
@enter <object name>=<message seen by person as they enter the object>
@leave <object name>=<message seen by person as the leave the object>

Specific Example 2:

@create Car
@desc Car =A shiny red car.
@set Car =enter_ok
@set Car =audible
@listen Car =*
@prefix Car =From inside the car,
@inprefix Car =From outside the car,
@idesc Car =The leather seats are comfortable!
@oxleave Car =climbs out of the car.
@oxenter Car =climbs into the car.
@oenter Car =joins you in the car.
@oleave Car =gets out of the car.
@enter Car =You get into the car.
@leave Car =You get out of the car.

Note: help files are available on the MUSH! Find them in help interiors and help interiors2.

Advanced Stuff

OOC Note: Has been tested quite a bit. If it doesn't work the way you want, feel free to @mail/page Rockpath or ask someone on +techies.

Okay, so now you're an expert on making enterable objects. What if you have a fixed-spot enterable object that you wish to emit to a secondary room? This is a bit more difficult! The best example is the stage at the Baby Seal (with the stage, backstage, and audience). You want the stage to be in the Audience Room, and the Backstage to be hearing what's happening on-stage. So the last setup is to make it so the backstage will hear the stage despite the Stage being in the Audience Room.

Let's say we have the Audience Room (say the DBref is #123), the Stage (#456), and the Backstage Area (#789). After following the above steps, type these in, replacing the respective DBrefs with your own. (Explanation below the code)

@lock/Filter #456=IS_AUDIENCE/0
&FILTER #456=*has left.
&INFILTER #456=*has arrived.
&FORWARDLIST #456=#789
&IS_AUDIENCE #456=[member([lplayers(#123)], %#)]
Retrieved from "https://www.yuriba.com/mwiki/index.php?title=OOC:Enterable_Objects&oldid=11759"