Garry's Mod Wiki

Revision Difference

Structures/ENT#517047

<cat>struct</cat> <structure> <description> Information about the ENT structure. To learn more about scripted entities, [see this page](/gmod/Scripted_Entities). For list of callbacks, see . While some of the fields may be serverside or clientside only, it is recommended to provide them on both so addons could use their values. </description> <fields>{{StructureField|string|Base|The base entity to derive from. This **must** be a valid Lua entity</fields>⤶ ⤶ </structure>⤶ ⤶ {{StructureField|string|Type|Type of the entity. This **must be one of these:** <fields>⤶ <item name="Base" type="string">The base entity to derive from. This **must** be a valid Lua entity</item>⤶ <item name="Type" type="string">Type of the entity. This **must be one of these:** * **anim** * **brush** * **point** * **ai** * **nextbot** * **filter** See <page>Scripted Entities</page> for a more detailed explanation of what each one is.}}{{StructureField|string|ClassName|Entity class name of the entity (File or folder name of your entity). **This is set automatically `after` the entity file is loaded.**⤶ }}{{StructureField|string|Folder|The folder from where the entity was loaded. This should always be "entity/ent_myentity", regardless whether your entity is stored as a file, or multiple files in a folder. **This is set automatically `before` the entity file is loaded.**}}{{StructureField|boolean|AutomaticFrameAdvance|(Clientside) Set this to true if your entity has animations. You should also apply changes to the <page>ENTITY:Think</page> function from the example on that page.|false}}{{StructureField|string|Category|(Clientside) Spawnmenu category to put the entity into|Other}}{{StructureField|boolean|Spawnable|Whether this entity should be displayed and is spawnable in the spawn menu|false}}{{StructureField|boolean|Editable|Whether the entity supports Editing. See <page>Editable Entities</page> for more info.|false}}{{StructureField|boolean|AdminOnly|Whether or not only admins can spawn the entity from their spawn menu|false}}{{StructureField|string|PrintName|(Clientside) Nice name of the entity to appear in the spawn menu|""}}{{StructureField|string|Author|(Clientside) The author of the entity|""}}{{StructureField|string|Contact|(Clientside) The contacts of the entity creator|""}}{{StructureField|string|Purpose|(Clientside) The purpose of the entity creation|""}}{{StructureField|string|Instructions|(Clientside) How to use your entity|""}}{{StructureField|number|RenderGroup|(Clientside) The entity's render group, see <page>RENDERGROUP</page>.|RENDERGROUP_OPAQUE}}{{StructureField|boolean|DisableDuplicator|(Serverside) Disable the ability for players to duplicate this entity.|false}}{{StructureField|string|ScriptedEntityType|(Clientside) Sets the spawnmenu content icon type for the entity, used by spawnmenu in the Sandbox-derived gamemodes.⤶ See <page>Scripted Entities</page> for a more detailed explanation of what each one is.</item>⤶ <item name="ClassName" type="string">Entity class name of the entity (File or folder name of your entity). **This is set automatically `after` the entity file is loaded.**</item>⤶ <item name="Folder" type="string">The folder from where the entity was loaded. This should always be "entity/ent_myentity", regardless whether your entity is stored as a file, or multiple files in a folder. **This is set automatically `before` the entity file is loaded.**</item>⤶ {{StructureField|boolean|AutomaticFrameAdvance|(Clientside) Set this to true if your entity has animations. You should also apply changes to the <page>ENTITY:Think</page> function from the example on that page.|false⤶ </fields>⤶ ⤶ </structure>⤶ ⤶ {{StructureField|string|Category|(Clientside) Spawnmenu category to put the entity into|Other}}{{StructureField|boolean|Spawnable|Whether this entity should be displayed and is spawnable in the spawn menu|false}}{{StructureField|boolean|Editable|Whether the entity supports Editing. See <page>Editable Entities</page> for more info.|false}}{{StructureField|boolean|AdminOnly|Whether or not only admins can spawn the entity from their spawn menu|false}}{{StructureField|string|PrintName|(Clientside) Nice name of the entity to appear in the spawn menu|""}}{{StructureField|string|Author|(Clientside) The author of the entity|""}}{{StructureField|string|Contact|(Clientside) The contacts of the entity creator|""}}{{StructureField|string|Purpose|(Clientside) The purpose of the entity creation|""}}{{StructureField|string|Instructions|(Clientside) How to use your entity|""}}{{StructureField|number|RenderGroup|(Clientside) The entity's render group, see <page>RENDERGROUP</page>.|RENDERGROUP_OPAQUE}}{{StructureField|boolean|DisableDuplicator|(Serverside) Disable the ability for players to duplicate this entity.|false}}{{StructureField|string|ScriptedEntityType|(Clientside) Sets the spawnmenu content icon type for the entity, used by spawnmenu in the Sandbox-derived gamemodes.⤶ See <page>spawnmenu.AddContentType</page> for more information.|"entity" }}{{StructureField|boolean|DoNotDuplicate|(Serverside) If set, the entity will not be duplicated via the built-in duplicator system.}}⤶ }}}}<item name="DoNotDuplicate" type="boolean">(Serverside) If set, the entity will not be duplicated via the built-in duplicator system.</item>⤶ }}