Difference between revisions of "MUDL:Construct"

From WikiName
Jump to: navigation, search
(Created page with " __TOC__ = Overview = This MUDL function gets called when: * The room containing the MUDL procedure is created (boot) * The mobile containing the MUDL procedure is created *...")
 
m (Overview)
Line 6: Line 6:
 
This MUDL function gets called when:
 
This MUDL function gets called when:
 
* The room containing the MUDL procedure is created (boot)
 
* The room containing the MUDL procedure is created (boot)
 +
* The area containing the MUDL procedure is created (boot)
 
* The mobile containing the MUDL procedure is created
 
* The mobile containing the MUDL procedure is created
 
* The procedure's PROC_ENABLED value is set to a non-zero value.
 
* The procedure's PROC_ENABLED value is set to a non-zero value.
  
 
This is the perfect spot to initialize variables in the MUDL script.  For mobiles, the constructor is called after the mobile is placed in a room.
 
This is the perfect spot to initialize variables in the MUDL script.  For mobiles, the constructor is called after the mobile is placed in a room.
 
  
 
= Command Syntax =
 
= Command Syntax =

Revision as of 20:41, 16 May 2017

Overview

This MUDL function gets called when:

  • The room containing the MUDL procedure is created (boot)
  • The area containing the MUDL procedure is created (boot)
  • The mobile containing the MUDL procedure is created
  • The procedure's PROC_ENABLED value is set to a non-zero value.

This is the perfect spot to initialize variables in the MUDL script. For mobiles, the constructor is called after the mobile is placed in a room.

Command Syntax

addproc <room|mobile|object> mudl
setproc <room|mobile|object> ## construct


Global Variables

The following global variables are available:

Name Type Description
 %c Character The mobile that the MUDL script is attached to. This value is null if the script is attached to a room or object.
 %o Object The object that the MUDL script is attached to. This value is null if the script is attached to a room or mobile.
 %r Room The room that the MUDL script is attached to. This value is null if the script is attached to a mobile or object.


Return Values

The constructor's return value is ignored.