CreateNodeFromClass
CreateNodeFromClass(classname as string)
Arguments
-
<classname>
- The class from which to make the node.
-
Definition
Create a node from a specified class. A node can have any number of classes on it, though the first one it is declared as becomes its "base class." This is just like standard object oriented inheritance.
Nodes created via this command are not persistent, and will not be stored in the database. For example, if the Area Server is shut down, the DOM "goes away", and all non-persistent nodes are lost.
If a character has non-persistent nodes associated (such as objects in a backpack), then these nodes will vanish whenever the player leaves an area. In other words, if a player is manipulating nodes in different areas, it is best to make those nodes persistent. To do this, use the Create Persisted Node From Class built-in function.
For more information, please see the section on Node Creation.
Example
box as noderef box = CreateNodeFromClass("container") sword as noderef = CreateNodeFromClass("thingie")
See also
- CNFC, related CLI command