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:
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"
.Members
number ModelScale
The entity's model scale, see Entity:GetModelScale. This will only be present if the model scale isn't 1.
number ColGroup
The entity's collision group, see Entity:GetCollisionGroup. Uses the COLLISION_GROUP enum.
table PhysicsObjects
Data about the entity's PhysObjs, see Entity:GetPhysicsObjectNum. The key is the physics object index (starts from 0), and the value is a PhysicsObjectSave structure. Unlike other tables in this structure, if there are no physics objects for this entity this will be an empty table.
table Flex
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.
table BodyG
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.
table BoneManip
Bone manipulation data, see Entity:HasBoneManipulations. The key is the bone index and the value is a BoneManipulationData structure. Only bones that have been manipulated with non-default values are listed, and if none exist, this field will be nil.
number MapCreationID
The entity's MapCreationID, only exists for entities that were created by the map. See Entity:MapCreationID.