Revision Difference
Structures/EntityCopyData#511952
<cat>struct</cat>⤶
<structure>⤶
<description>⤶
Data structure used by the <page>duplicator</page> to store and load entity data.⤶
⤶
It is created by <page>duplicator.CopyEntTable</page> and can be loaded by <page>duplicator.CreateEntityFromTable</page>.⤶
⤶
It also shows up in several other contexts:⤶
* <page>duplicator.RegisterEntityClass</page>⤶
* <page>ENTITY:OnEntityCopyTableFinish</page>⤶
* <page>ENTITY:OnDuplicated</page>⤶
&lt;nowiki /&gt;⤶
<note>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".</note>⤶
</description>⤶
<fields>{{StructureField|string|Name|The entity's name, see <page>Entity:GetName</page>.</fields>⤶
⤶
</structure>⤶
⤶
{{StructureField|string|Class|The entity's class name, see <page>Entity:GetClass</page>.}}{{StructureField|Vector|Pos|The entity's position, relative to the duplication origin point.}}{{StructureField|Angle|Angle|The entity's angle, relative to the duplication angle.}}{{StructureField|table|DT|The entity's Network Vars, see <page>ENTITY:SetupDataTables</page> and <page>Networking Entities</page>.}}{{StructureField|string|Model|The entity's model, see <page>Entity:GetModel</page>.}}{{StructureField|number|ModelScale|The entity's model scale, see <page>Entity:GetModelScale</page>. This will only be present if the model scale isn't 1.}}{{StructureField|number|Skin|The entity's active skin, see <page>Entity:GetSkin</page>.}}{{StructureField|number|ColGroup|The entity's collision group, see <page>Entity:GetCollisionGroup</page>. Uses the <page>COLLISION_GROUP</page>.}}{{StructureField|Vector|Mins|The entity's collision bound minimums, see <page>Entity:GetCollisionBounds</page>.}}{{StructureField|Vector|Maxs|The entity's collision bound maximums, see <page>Entity:GetCollisionBounds</page>.}}{{StructureField|table|PhysicsObjects|Data about the entity's <page>PhysObj</page>s, see <page>Entity:GetPhysicsObjectNum</page>. The key is the physics object index (starts from 0), and the value is a <page>PhysicsObjectSave</page>. Unlike other tables in this structure, if there are no physics objects for this entity this will be an empty table.}}{{StructureField|number|FlexScale|The entity's Flex Scale, see <page>Entity:GetFlexScale</page>.}}{{StructureField|table|Flex|Each flex bone's flex weight, see <page>Entity:GetFlexWeight</page>. 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.}}{{StructureField|table|BodyG|The entity's body groups, see <page>Entity:GetBodygroup</page>. 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.}}{{StructureField|table|BoneManip|Bone manipulation data, see <page>Entity:HasBoneManipulations</page>. The key is the bone index and the value is a <page>BoneManipulationData</page>. Only bones that have been manipulated with non-default values are listed, and if none exist, this field will be nil.}}{{StructureField|number|MapCreationID|The entity's MapCreationID, only exists for entities that were created by the map. See <page>Entity:MapCreationID</page>.}}{{StructureField|number|WorkshopID|Deprecated, always 0. See <page>Entity:GetWorkshopID</page>.}}⤶
}}