Garry's Mod Wiki

Revision Difference

Structures/ENT#517073

<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> <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.</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⤶ <item name="AutomaticFrameAdvance" type="boolean" default="false">(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.</item>⤶ <item name="Category" type="string" default="Other">(Clientside) Spawnmenu category to put the entity into</item>⤶ <item name="Spawnable" type="boolean" default="false">Whether this entity should be displayed and is spawnable in the spawn menu</item>⤶ <item name="Editable" type="boolean" default="false">Whether the entity supports Editing. See <page>Editable Entities</page> for more info.</item>⤶ <item name="AdminOnly" type="boolean" default="false">Whether or not only admins can spawn the entity from their spawn menu</item>⤶ <item name="PrintName" type="string" default="\u0022\u0022">(Clientside) Nice name of the entity to appear in the spawn menu</item>⤶ <item name="Author" type="string" default="\u0022\u0022">(Clientside) The author of the entity</item>⤶ <item name="Contact" type="string" default="\u0022\u0022">(Clientside) The contacts of the entity creator</item>⤶ <item name="Purpose" type="string" default="\u0022\u0022">(Clientside) The purpose of the entity creation</item>⤶ <item name="Instructions" type="string" default="\u0022\u0022">(Clientside) How to use your entity</item>⤶ <item name="RenderGroup" type="number" default="RENDERGROUP_OPAQUE">(Clientside) The entity's render group, see <page>RENDERGROUP</page>.</item>⤶ <item name="DisableDuplicator" type="boolean" default="false">(Serverside) Disable the ability for players to duplicate this entity.</item>⤶ <item name="ScriptedEntityType" type="string" default="\u0022entity\u0022">(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.</item>⤶ <item name="DoNotDuplicate" type="boolean">(Serverside) If set, the entity will not be duplicated via the built-in duplicator system.</item>⤶ </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"⤶ }}<item name="DoNotDuplicate" type="boolean">(Serverside) If set, the entity will not be duplicated via the built-in duplicator system.</item>⤶ ⤶ }}