CreatePersistedNodeFromPrototype
From HEWIKI
(Redirected from Create Persisted Node From Prototype)
CreatePersistedNodeFromPrototype(<prototype>)
Arguments
-
<prototype>
- A string with the name of the prototype that will be used
-
Definition
Creates a persisted node from a specified prototype. All of the fields on the new node will have the same values as the prototype. The new node will also be persistent.
Notes:
- After it is created, the new node must be associated with some other node that makes it findable, otherwise it is a dead or "floating" orphaned node that cannot be accessed.
- When using the CLI, a prototype can be specified by name or ID#, but in HeroScript, only a prototype name can be used.
Example
box as noderef box = CreatePersistedNodeFromPrototype("container")
See also
- Creating and Deleting Nodes
- Prototypes
- CreateNodeFromPrototype function
- CNFP, related CLI command