Garry's Mod Wiki



Information about the ENT structure.

To learn more about scripted entities, see this page.

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.

Values defined in ENT table can't be changed per instance. Initialize default values in ENTITY:Initialize or other hook


Base [string]

The base entity to derive from. This must be a valid Lua entity

Type [string]

Type of the entity. This must be one of these:

  • anim
  • brush
  • point
  • ai
  • nextbot
  • filter

See Scripted Entities for a more detailed explanation of what each one is.

ClassName [string]

Entity class name of the entity (File or folder name of your entity). This is set automatically after the entity file is loaded.

Folder [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.

AutomaticFrameAdvance [boolean]

(Clientside) Set this to true if your entity has animations. You should also apply changes to the ENTITY:Think function from the example on that page.

Default: false

Category [string]

(Clientside) Spawnmenu category to put the entity into

Default: "Other"

Spawnable [boolean]

Whether this entity should be displayed and is spawnable in the spawn menu

Default: false

Editable [boolean]

Whether the entity supports Editing. See Editable Entities for more info.

Default: false

AdminOnly [boolean]

Whether or not only admins can spawn the entity from their spawn menu

Default: false

PrintName [string]

(Clientside) Nice name of the entity to appear in the spawn menu

Author [string]

(Clientside) The author of the entity

Contact [string]

(Clientside) The contacts of the entity creator

Purpose [string]

(Clientside) The purpose of the entity creation

Instructions [string]

(Clientside) How to use your entity

RenderGroup [number]

(Clientside) The entity's render group, see Enums/RENDERGROUP.


DisableDuplicator [boolean]

(Serverside) Disable the ability for players to duplicate this entity.

Default: false

ScriptedEntityType [string]

(Clientside) Sets the spawnmenu content icon type for the entity, used by spawnmenu in the Sandbox-derived gamemodes. See spawnmenu.AddContentType for more information.

DoNotDuplicate [boolean]

(Serverside) If set, the entity will not be duplicated via the built-in duplicator system.

Default: false

IconOverride [string]

(Clientside) If set, overrides the icon path to be displayed in the Spawnmenu for this entity.

Default: "materials/entities/<ClassName>.png"