# How to: Enumerating Room Exits

"Geoffrey King" (G.King@mailbox.uq.oz.au)
Sat, 18 May 1996 03:42:01 PDT

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    Hi folks,

    Here is my problem:
    I am creating an autonomous object (a mouse). It needs to be able to
    randomly choose from one of the available exits in the room and go
    through it.

    Well thats dead easy as a Wizard just use this.location.exits.
    Unfortunately normal plebs don't get read permissiion on those exits,
    for obvious enough reasons.

    So, how do i enumerate the available exits ?

    My only though is to write a $utility that :
    	o runs at wizard level and
    	o does some sort of security/permission checking on the candidate
    	o returns a list of available exits.

    Sounds useful to me, anyone written the code?

    Thanks for suggestions (or code :).

    --Geoffrey King--Software Engineer--Ice T Multimedia--