Talk Page

typCreate

Syntax (typCreate unid XML) → True/Nil
Arguments unid: The UNID to assign to the created type. Must not already be bound to a type unless the code is run in OnGlobalTypesInit
XML: The XML that defines the created type. Must be valid for type creation to work. Certain dynamic types are not supported at certain times.
Returns True if the successful, Nil otherwise
Category type_functions
Description Supports “dynamic types,” or types that are generated by TLisp code and not fully defined in XML. Can be used during game creation or any time after the game starts. Does not support all types.

Support

The following dynamic types are not supported at all.

The following dynamic types can be created only during the event OnGlobalTypesInit, which fires when a new game is created.

All other types not listed here are always supported during an active game.

Example

Return to type functions list

Return to Functions list