Difference between revisions of "Rooms"
(→Properties and Functions) |
|||
Line 24: | Line 24: | ||
|- | |- | ||
| [[UID]] || R || Gets the room's unique ID in the world. | | [[UID]] || R || Gets the room's unique ID in the world. | ||
+ | |} | ||
+ | |||
+ | ==Triggers== | ||
+ | Here is a list of all room triggers. Click on the trigger name for more detailed information such as arguments and examples. | ||
+ | |||
+ | {| border="1" cellspacing="4" cellpadding="4" | ||
+ | | '''Name''' || '''Description''' | ||
+ | |- | ||
+ | | [[@Enter]] || Fires when a character enters the room. | ||
+ | |- | ||
+ | | [[@Exit]] || Fires when a character exits the room. | ||
+ | |- | ||
+ | | [[@Step]] || Fires whenever a character takes a step within the room. | ||
|} | |} | ||
[[Category: Reference Compendium]] | [[Category: Reference Compendium]] | ||
[[Category: Objects]] | [[Category: Objects]] |
Revision as of 02:43, 20 July 2013
Within regions you can also define rooms, which are basically 'sub-regions' that exist inside the area which may represent buildings within a town or a boss room within a dungeon. Accessing rooms in scripts can be accomplished using the ROOM reference from a character, item or map point object, or the ROOM.room_id reference from the server object. The following table details the various properties of the room object in SphereServer:
Contents
Properties and Functions
Here is a list of all room properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples. The properties from the room definition can also be accessed from the room object. If an attempt is made to execute (not read) a command that does not exist on the room, then the command will be called on all sectors that touch the room area.
Name | Read/Write | Description |
ALLCLIENTS command | W | Executes command on all clients inside the room boundaries. |
CLIENTS | R | Gets the total number of clients that are inside the sectors that touch the room. |
EVENTS +/-regiontype_defname | RW | Gets a list of attached room events, or adds or removes a room event to or from the room. |
ISEVENT.regiontype_defname | R | Returns 1 if the room has a specified room event attached. |
MAP | R | Gets the map that the room exists on. |
RECT | R | Gets the number of rectangles that this room is made from. |
RECT.n | R | Gets the nth rectangle that this room is made from. |
UID | R | Gets the room's unique ID in the world. |
Triggers
Here is a list of all room triggers. Click on the trigger name for more detailed information such as arguments and examples.
Name | Description |
@Enter | Fires when a character enters the room. |
@Exit | Fires when a character exits the room. |
@Step | Fires whenever a character takes a step within the room. |