Garry's Mod Wiki

EntityCopyData

Description

Data structure used by the duplicator to store and load entity data.

It is created by duplicator.CopyEntTable and can be loaded by duplicator.CreateEntityFromTable.

It also shows up in several other contexts:

1=In addition to all fields listed here, any field saved on the entity will be saved as-is to this table. For example, if you set ent.FavoriteFood = "Steak" before duplicating it, this structure will also contain the field FavoriteFood with the value "Steak".

Parameters

Name [string]

The entity's name, see Entity:GetName.

Class [string]

The entity's class name, see Entity:GetClass.

Pos [Vector]

The entity's position, relative to the duplication origin point.

Angle [Angle]

The entity's angle, relative to the duplication angle.

DT [table]

The entity's Network Vars, see ENTITY:SetupDataTables and Networking Entities.

Model [string]

The entity's model, see Entity:GetModel.

ModelScale [number]

The entity's model scale, see Entity:GetModelScale. This will only be present if the model scale isn't 1.

Skin [number]

The entity's active skin, see Entity:GetSkin.

ColGroup [number]

The entity's collision group, see Entity:GetCollisionGroup. Uses the Enums/COLLISION_GROUP.

Mins [Vector]

The entity's collision bound minimums, see Entity:GetCollisionBounds.

Maxs [Vector]

The entity's collision bound maximums, see Entity:GetCollisionBounds.

PhysicsObjects [table]

Data about the entity's PhysObjs, see Entity:GetPhysicsObjectNum. The key is the physics object index (starts from 0), and the value is a Structures/PhysicsObjectSave. Unlike other tables in this structure, if there are no physics objects for this entity this will be an empty table.

FlexScale [number]

The entity's Flex Scale, see Entity:GetFlexScale.

Flex [table]

Each flex bone's flex weight, see Entity:GetFlexWeight. The key is the flex's index and the value is the weight. Only flexes with a non-default (nonzero) weight are listed, and if none exist, this field will be nil.

BodyG [table]

The entity's body groups, see Entity:GetBodygroup. The key is the bodygroup ID and the value is the assigned bodygroup number. Only body groups with a non-default (> 0) value are listed, and if none exist, this field will be nil.

BoneManip [table]

Bone manipulation data, see Entity:HasBoneManipulations. The key is the bone index and the value is a Structures/BoneManipulationData. Only bones that have been manipulated with non-default values are listed, and if none exist, this field will be nil.

MapCreationID [number]

The entity's MapCreationID, only exists for entities that were created by the map. See Entity:MapCreationID.

WorkshopID [number]

Deprecated, always 0. See Entity:GetWorkshopID.

Page Links


Special Pages


Wikis

?

Render Time: 96ms

DB GetPage 4
Generate Html 54
SaveChanges (1) 22
Render Body 0
Render Sidebar 13