Arma Reforger Script API
|
Component defining editable entity. More...
Public Member Functions | |
string | GetDisplayName () |
Get entity name from info component. | |
ResourceName | GetPrefab (bool shorten=false) |
Get entity prefab. | |
SCR_EditableEntityComponentClass | GetEditableEntityData (IEntity owner=null) |
Get prefab data of this editable entity. | |
EEditableEntityType | GetEntityType (IEntity owner=null) |
Get entity type. | |
SCR_EditableEntityInteraction | GetEntityInteraction (IEntity owner=null) |
Get entity interaction rules of this entity. | |
SCR_UIInfo | GetInfo (IEntity owner=null) |
Get information about the entity. | |
ScriptInvokerEntity | GetOnDeleted () |
Get event called when entity is deleted. | |
void | SetInfoInstance (SCR_UIInfo info) |
Set information about the entity on entity instance, locally on this machine. | |
bool | IsReplicated (out RplId replicationID=-1) |
Check component's replication. | |
bool | Serialize (out SCR_EditableEntityComponent outTarget=null, out int outTargetIndex=-1, out EEditableEntitySaveFlag outSaveFlags=0) |
Check if the entity can be serialized during session saving managed by SCR_EditableEntityStruct. | |
void | Deserialize (SCR_EditableEntityComponent target, int targetValue) |
Deserialise the entity based on given params. | |
GenericEntity | GetOwnerScripted () |
bool | GetPos (out vector pos) |
Get position representing the entity. | |
vector | GetIconPos () |
Get icon offset. | |
bool | GetTransform (out vector outTransform[4]) |
Get world transformation matrix of editable entity. | |
bool | GetLocalTransform (out vector outTransform[4]) |
Get local transformation matrix of editable entity. | |
int | GetPlayerID () |
Get player controlling this entity. | |
void | SetAuthor (int playerID) |
Sets AuthorID (player that modified this entity last) in Session. | |
void | SetAuthor (SCR_EditableEntityAuthor author) |
Sets AuthorID (player that modified this entity last) from a Save. | |
SCR_EditableEntityAuthor | GetAuthor () |
string | GetAuthorUID () |
Returns author UID. | |
string | GetAuthorPlatformID () |
Returns author Platform ID. | |
int | GetAuthorPlayerID () |
Returns author Player ID. | |
int | GetAuthorLastUpdated () |
Returns Unix Time of last modification. | |
PlatformKind | GetAuthorPlatform () |
Returns Unix Time of last modification. | |
void | SetAuthorUID (string authorUID) |
Set Author UID (for normal usage use SetAuthor()) | |
void | SetAuthorPlatformID (string authorPlatformID) |
void | SetAuthorUpdatedTime (int updatedLast) |
Set Time of last update. | |
void | SetAuthorPlatform (PlatformKind authorPlatform) |
Faction | GetFaction () |
Get entity's faction. | |
ScriptInvoker | GetOnUIRefresh () |
Get event called when GUI should refresh entity's GUI, i.e., update faction color and call events in GUI widgets. | |
ScriptInvoker | GetOnUIReset () |
Get event called when GUI should reset widgets that are used for entity visualization. | |
SCR_EditableEntityComponent | GetAIGroup () |
Get entity's AI group. | |
SCR_EditableEntityComponent | GetAIEntity () |
Get entity which represents this entity as AI. | |
SCR_EditableEntityComponent | GetVehicle () |
Get vehicle the entity's in. | |
int | GetCrew (out notnull array< CompartmentAccessComponent > crewCompartmentAccess, bool ignorePlayers=true) |
Get crew of vehicle or if in a vehicle get self. | |
float | GetHealth () |
Get entity health. | |
bool | CanDestroy () |
bool | IsDestroyed () |
Check if the entity is destroyed. | |
void | SetStatic (bool isStatic) |
Set entity as static. | |
bool | GetStatic () |
Check if the entity is marked as static. | |
void | UpdateStaticPos () |
Update static cached position. | |
void | SetHierarchyAsDirtyInParents () |
Mark hierarchy in all parents of the entity as dirty, i.e., modified by user. | |
void | SetHierarchyAsDirty () |
Mark entity hierarchy as dirty, i.e., modified by user. | |
void | SetTransformWithChildren (vector transform[4]) |
Update transformation of the entity and all its editor children and broadcast the changes to all clients. | |
void | SetTransform (vector transform[4], bool changedByUser=false) |
Update entity's transformation and broadcast the changes to all clients. | |
bool | Destroy () |
Kill/destroy this editable entity. | |
bool | Delete (bool changedByUser=false, bool updateNavmesh=false) |
Delete this editable entity. | |
RplId | GetOwnerRplId () |
float | GetMaxDrawDistanceSq () |
Get squared maximum distance in which this entity is drawn in editor (e.g., with an icon). | |
void | SetMaxDrawDistance (float maxDrawDistance) |
Set maximum distance in which this entity is drawn in editor (e.g., with an icon). | |
bool | GetEntityBudgetCost (out notnull array< ref SCR_EntityBudgetValue > outBudgets, IEntity owner=null) |
Get entity budget costs. | |
bool | GetEntityChildrenBudgetCost (out notnull array< ref SCR_EntityBudgetValue > outBudgets, IEntity owner=null) |
Get entity budget costs including cost of children (for groups/compositions) | |
bool | GetEntityAndChildrenBudgetCost (out notnull array< ref SCR_EntityBudgetValue > outBudgets, IEntity owner=null) |
Get budgets for both, entity and it's children. | |
bool | CanDuplicate (out notnull set< SCR_EditableEntityComponent > outRecipients) |
Can entity be duplicated by editor and which recipients should be passed to the duplicated entity Overridden by other EditableEntityComponents. | |
void | ForceVehicleCompartments (notnull array< ECompartmentType > forceVehicleCompartments) |
Authority Only, forces entities such as Character and Group to place characters into a specific vehicle position. | |
void | OnCreatedServer (notnull SCR_PlacingEditorComponent placedEditorComponent) |
bool | HasEntityState (EEditableEntityState state) |
Check if given entity state is active. | |
EEditableEntityState | GetEntityStates () |
Check bit array with all currently active states. | |
void | SetEntityState (EEditableEntityState state, bool toSet) |
Set value of an entity state. | |
void | ResetEntityStates () |
Reset all entity states. | |
bool | HasEntityFlag (EEditableEntityFlag flag) |
Check if a flag is active. | |
EEditableEntityFlag | GetEntityFlags () |
Get entity flags. | |
void | SetEntityFlag (EEditableEntityFlag flag, bool toSet) |
Set entity flag. | |
void | CopyEntityFlags (EEditableEntityFlag flags) |
Override the Entity flags. | |
string | GetLogText (string prefix="") |
void | Log (string prefix="", bool onlyDirect=false, LogLevel logLevel=LogLevel.DEBUG) |
Print out entity information. | |
void | Log (string prefix, EEditableEntityAccessKey accessKey) |
Print out the entity and all its descendants which are compatible with given key. | |
void | LogAccessKey () |
Print out entity's access key. | |
SCR_EditableEntityComponent | EOnEditorPlace (out SCR_EditableEntityComponent parent, SCR_EditableEntityComponent recipient, EEditorPlacingFlags flags, bool isQueue, int playerID=0) |
Event called on server when the entity is placed in the editor. | |
void | EOnEditorSessionLoad (SCR_EditableEntityComponent parent) |
Event called on server when the session is being loaded by SCR_EditableEntityStruct. | |
override bool | RplSave (ScriptBitWriter writer) |
override bool | RplLoad (ScriptBitReader reader) |
override void | OnDelete (IEntity owner) |
override void | OnPostInit (IEntity owner) |
void | SCR_EditableEntityComponent (IEntityComponentSource src, IEntity ent, IEntity parent) |
void | Attach (notnull SCR_EditableEntityComponent attachable) |
Add the received attachable waypoint to the attached entities (runs on parent) | |
void | Detach (notnull SCR_EditableEntityComponent attachable) |
Removes the received attachable waypoint from the attached entities (runs on parent) | |
set< SCR_EditableEntityComponent > | GetAttachedEntities () |
Returns attached entities of self. | |
bool | IsAttachable () |
Returns if current entity is attachable. | |
bool | IsAttached () |
Returns if current entity is attached. | |
SCR_EditableEntityComponent | GetAttachedTo () |
Returns current entity which this editable task is attached to. | |
Hierarchy | |
Functions to manage hierarchy of the entity. | |
bool | CanSetParent (SCR_EditableEntityComponent parentEntity) |
Check if the entity can be moved to intended parent. | |
SCR_EditableEntityComponent | SetParentEntity (SCR_EditableEntityComponent parentEntity, bool changedByUser=false) |
Set parent of the entity. | |
void | RestoreParentEntity () |
Add the entity to its previous parent after it was unregistered using RemoveParentEntity() Allowed only on server. | |
void | RemoveParentEntity () |
Remove entity from its parent. | |
SCR_EditableEntityComponent | GetParentEntity () |
Get parent entity. | |
void | GetParentEntities (out notnull array< SCR_EditableEntityComponent > entities) |
Get hierarchy of all parent entities, all the way to the root. | |
bool | IsChildOf (SCR_EditableEntityComponent entity) |
Check if the entity is in hierarchy of given entity. | |
set< SCR_EditableEntityComponent > | GetChildrenRef () |
Get direct reference to entity's immediate children. | |
void | GetChildren (out notnull set< SCR_EditableEntityComponent > entities, bool onlyDirect=false, bool skipIgnored=false) |
Get child entities. | |
void | GetChildren (out notnull set< SCR_EditableEntityComponent > entities, bool onlyDirect, EEditableEntityAccessKey accessKey) |
Get child entities with compatible key. | |
int | GetChildrenCount (bool onlyDirect=false) |
Get number of child entities. | |
SCR_EditableEntityComponent | GetChild (int index) |
Get child on given index. | |
bool | IsLayer () |
Check if the entity is also a layer, i.e., has some child entities. | |
bool | CanEnterLayer (SCR_LayersEditorComponent layersManager=null, bool toExtreme=false) |
Checks if can enter layer. | |
bool | IsRegistered () |
Check if the entity is registered. | |
Visibility | |
Functions to manage visibility of the entity. | |
void | SetVisible (bool show) |
Set entity visibility. | |
void | EnableVisibilityReplication (bool enable) |
bool | CanReplicateVisibility () |
void | OnRplVisibilityChanged () |
bool | GetVisibleSelf () |
Check visibility setting of the entity. | |
bool | GetVisibleInHierarchy () |
Check visibility setting of the entity in hierarchy (e.g., if an entity is set as visible, but its parent is not, false will be returned). | |
Access Key | |
Functions to manage access key.
| |
void | AddAccessKey (EEditableEntityAccessKey accessKey) |
Add access key. | |
void | RemoveAccessKey (EEditableEntityAccessKey accessKey) |
Remove access key. | |
void | ClearAccessKeys () |
Clear all access keys. | |
EEditableEntityAccessKey | GetAccessKey () |
Get entity's access key. | |
bool | HasAccessSelf (EEditableEntityAccessKey accessKey) |
Check access key of the entity. | |
bool | HasAccessInHierarchy (EEditableEntityAccessKey accessKey) |
Check acces keys of the entity in hierarchy (e.g., if an entity is compatible, but its parent is not, false will be returned). | |
bool | HasAccessSelf () |
Check access key of the entity compared to those defined in SCR_AccessKeysEditorComponent. | |
bool | HasAccessInHierarchy () |
Check access key of the entity in hierarchy (e.g., if an entity is compatible, but its parent is not, false will be returned). | |
Static Public Member Functions | |
static SCR_EditableEntityComponent | GetEditableEntity (IEntity owner) |
Get editable entity component on given entity. | |
Protected Member Functions | |
bool | IsServer () |
bool | CanRpc () |
void | SetTransformOwner (vector transform[4]) |
void | SetTransformBroadcast (vector transform[4]) |
void | OnAuthorChangedServer (string authorUID, int authorID, string authorPlatformID, int platform, int lastUpdated) |
void | OnAuthorChangedSaveServer (string authorUID, int authorID, string authorPlatformID, int platform, int lastUpdated) |
void | OnAuthorChanged (string authorUID, int authorID, string authorPlatformID, int platform, int lastUpdated) |
void | OnParentEntityChanged (SCR_EditableEntityComponent parentEntity, SCR_EditableEntityComponent parentEntityPrev, bool changedByUser) |
void | SetParentEntityBroadcast (SCR_EditableEntityComponent parentEntity, SCR_EditableEntityComponent parentEntityPrev, bool changedByUser=false, bool isAutoRegistration=false) |
void | SetParentEntityBroadcastReceive (RplId parentEntityID, RplId parentEntityPrevID, bool changedByUser) |
void | OnRegistrationChanged (bool toRegister) |
EEditableEntityRegister | GetAutoRegister () |
void | Register () |
void | Unregister (IEntity owner=null) |
void | AddToParent (SCR_EditableEntityComponent parentEntity, bool changedByUser) |
void | RemoveFromParent (SCR_EditableEntityComponent parentEntity, bool changedByUser) |
void | AddChild (SCR_EditableEntityComponent entity) |
void | RemoveChild (SCR_EditableEntityComponent entity) |
void | UpdateGameHierarchy (IEntity parent, IEntity child, bool toAdd) |
void | OnChildEntityChanged (SCR_EditableEntityComponent child, bool isAdded) |
void | SetEntityStateInChildren (IEntity owner, EEditableEntityState state, bool toSet, out array< Managed > components=null) |
void | OnVisibilityChanged () |
void | OnAccessKeyChanged (EEditableEntityAccessKey accessKey) |
void | Refresh () |
RplComponent | GetRplComponent () |
bool | ValidateType () |
Protected Attributes | |
EEditableEntityRegister | m_bAutoRegister |
vector | m_vIconPos |
bool | m_bEnabledVisibilityReplication |
bool | m_bVisible |
bool | m_bStatic |
float | m_fMaxDrawDistance |
EEditableEntityAccessKey | m_AccessKey |
EEditableEntityFlag | m_Flags |
SCR_EditableEntityComponent | m_ParentEntity |
GenericEntity | m_Owner |
EEditableEntityState | m_EntityState |
SCR_UIInfo | m_UIInfoInstance |
ref set< SCR_EditableEntityComponent > | m_Entities |
vector | m_vStaticPos |
int | m_iIconBoneIndex = -1 |
ref ScriptInvokerEntity | m_OnDeleted |
ref SCR_EditableEntityAuthor | m_Author |
int | m_iAuthorLastUpdated |
ref set< SCR_EditableEntityComponent > | m_aAttachedEntities |
Component defining editable entity.
void SCR_EditableEntityComponent.SCR_EditableEntityComponent | ( | IEntityComponentSource | src, |
IEntity | ent, | ||
IEntity | parent | ||
) |
[in] | src | |
[in] | ent | |
[in] | parent |
void SCR_EditableEntityComponent.AddAccessKey | ( | EEditableEntityAccessKey | accessKey | ) |
Add access key.
Available only on server!
[in] | accessKey | Key to be added |
|
protected |
|
protected |
void SCR_EditableEntityComponent.Attach | ( | notnull SCR_EditableEntityComponent | attachable | ) |
Add the received attachable waypoint to the attached entities (runs on parent)
[in] | target | to link current entity to |
bool SCR_EditableEntityComponent.CanDestroy | ( | ) |
Implemented in SCR_EditableExplosiveChargeComponent, SCR_EditableGroupComponent, and SCR_EditableMineComponent.
bool SCR_EditableEntityComponent.CanDuplicate | ( | out notnull set< SCR_EditableEntityComponent > | outRecipients | ) |
Can entity be duplicated by editor and which recipients should be passed to the duplicated entity Overridden by other EditableEntityComponents.
[out] | outRecipients | editableEntityComponents that will be passed to the duplicated entity (Groupcomponent / FactionComponent) |
Implemented in SCR_EditableFactionComponent, SCR_EditableGroupComponent, and SCR_EditableWaypointComponent.
bool SCR_EditableEntityComponent.CanEnterLayer | ( | SCR_LayersEditorComponent | layersManager = null , |
bool | toExtreme = false |
||
) |
Checks if can enter layer.
[in] | layersManager | give a layermanager ref, it will find the layer manager if left empty |
[in] | toExtreme | When enable, it will not move just one layer up, but all the way to root. And the same when moving down |
bool SCR_EditableEntityComponent.CanReplicateVisibility | ( | ) |
|
protected |
bool SCR_EditableEntityComponent.CanSetParent | ( | SCR_EditableEntityComponent | parentEntity | ) |
Check if the entity can be moved to intended parent.
[in] | parentEntity | New parent. Null when evaluating root. |
Implemented in SCR_EditableWaypointComponent.
void SCR_EditableEntityComponent.ClearAccessKeys | ( | ) |
Clear all access keys.
Available only on server!
void SCR_EditableEntityComponent.CopyEntityFlags | ( | EEditableEntityFlag | flags | ) |
Override the Entity flags.
[in] | flags | The flags to override to |
bool SCR_EditableEntityComponent.Delete | ( | bool | changedByUser = false , |
bool | updateNavmesh = false |
||
) |
Delete this editable entity.
[in] | changedByUser | True when the change was initiated by user |
[in] | updateNavmesh | True to update navmesh after the entity is deleted (set to false when deleting children of already deleted entity) |
Implemented in SCR_EditableCharacterComponent, and SCR_EditableTaskComponent.
void SCR_EditableEntityComponent.Deserialize | ( | SCR_EditableEntityComponent | target, |
int | targetValue | ||
) |
Deserialise the entity based on given params.
[in] | target | Entity to which this entity is attached to outside of hierarchy structure, e.g., character in a vehicle or waypoint on a target |
[in] | targetIndex | Further specification of the target, e.g., crew position index in a vehicle |
Implemented in SCR_EditableCharacterComponent, and SCR_EditableTaskComponent.
bool SCR_EditableEntityComponent.Destroy | ( | ) |
Kill/destroy this editable entity.
Implemented in SCR_EditableExplosiveChargeComponent, SCR_EditableGroupComponent, and SCR_EditableMineComponent.
void SCR_EditableEntityComponent.Detach | ( | notnull SCR_EditableEntityComponent | attachable | ) |
Removes the received attachable waypoint from the attached entities (runs on parent)
[in] | attachable | target to remove link |
void SCR_EditableEntityComponent.EnableVisibilityReplication | ( | bool | enable | ) |
[in] | enable |
SCR_EditableEntityComponent SCR_EditableEntityComponent.EOnEditorPlace | ( | out SCR_EditableEntityComponent | parent, |
SCR_EditableEntityComponent | recipient, | ||
EEditorPlacingFlags | flags, | ||
bool | isQueue, | ||
int | playerID = 0 |
||
) |
Event called on server when the entity is placed in the editor.
[out] | parent | Editable entity in which the new one is being created (rewrite the variable the change the parent) |
[in] | recipient | Entity that receives this editable entity (e.g., a group receiving a waypoint) |
[in] | flags | Placing flags enabled by user |
[in] | isQueue | true if the entity was placed in a queue (i.e., placing remains active) |
[in] | playerID | ID of the player placing the entity. |
Implemented in SCR_EditableCharacterComponent, SCR_EditableTaskComponent, SCR_EditableVehicleComponent, and SCR_EditableWaypointComponent.
void SCR_EditableEntityComponent.EOnEditorSessionLoad | ( | SCR_EditableEntityComponent | parent | ) |
Event called on server when the session is being loaded by SCR_EditableEntityStruct.
[in] | parent | Editable entity in which the new one is being created |
Implemented in SCR_EditableCharacterComponent.
void SCR_EditableEntityComponent.ForceVehicleCompartments | ( | notnull array< ECompartmentType > | forceVehicleCompartments | ) |
Authority Only, forces entities such as Character and Group to place characters into a specific vehicle position.
[in] | forceVehicleCompartments | compartment types to force for entity |
Implemented in SCR_EditableCharacterComponent, and SCR_EditableGroupComponent.
EEditableEntityAccessKey SCR_EditableEntityComponent.GetAccessKey | ( | ) |
Get entity's access key.
SCR_EditableEntityComponent SCR_EditableEntityComponent.GetAIEntity | ( | ) |
Get entity which represents this entity as AI.
Implemented in SCR_EditableCharacterComponent, SCR_EditableGroupComponent, and SCR_EditableVehicleComponent.
SCR_EditableEntityComponent SCR_EditableEntityComponent.GetAIGroup | ( | ) |
Get entity's AI group.
Implemented in SCR_EditableCharacterComponent, SCR_EditableGroupComponent, SCR_EditablePlayerDelegateComponent, SCR_EditableVehicleComponent, and SCR_EditableWaypointComponent.
set< SCR_EditableEntityComponent > SCR_EditableEntityComponent.GetAttachedEntities | ( | ) |
Returns attached entities of self.
SCR_EditableEntityComponent SCR_EditableEntityComponent.GetAttachedTo | ( | ) |
Returns current entity which this editable task is attached to.
Implemented in SCR_EditableTaskComponent, and SCR_EditableWaypointComponent.
SCR_EditableEntityAuthor SCR_EditableEntityComponent.GetAuthor | ( | ) |
int SCR_EditableEntityComponent.GetAuthorLastUpdated | ( | ) |
Returns Unix Time of last modification.
PlatformKind SCR_EditableEntityComponent.GetAuthorPlatform | ( | ) |
Returns Unix Time of last modification.
string SCR_EditableEntityComponent.GetAuthorPlatformID | ( | ) |
Returns author Platform ID.
int SCR_EditableEntityComponent.GetAuthorPlayerID | ( | ) |
Returns author Player ID.
string SCR_EditableEntityComponent.GetAuthorUID | ( | ) |
Returns author UID.
|
protected |
SCR_EditableEntityComponent SCR_EditableEntityComponent.GetChild | ( | int | index | ) |
Get child on given index.
[in] | index | Child index |
Implemented in SCR_EditableGroupComponent.
void SCR_EditableEntityComponent.GetChildren | ( | out notnull set< SCR_EditableEntityComponent > | entities, |
bool | onlyDirect, | ||
EEditableEntityAccessKey | accessKey | ||
) |
Get child entities with compatible key.
[out] | entities | Array to be filled with child entities |
[in] | onlyDirect | When true, only the direct descendants are returned, otherwise all children, children of children etc. are returned. |
[in] | accessKey | Return only entities with at least one key matching this value |
void SCR_EditableEntityComponent.GetChildren | ( | out notnull set< SCR_EditableEntityComponent > | entities, |
bool | onlyDirect = false , |
||
bool | skipIgnored = false |
||
) |
Get child entities.
[out] | entities | Array to be filled with child entities (NOT cleared before filling) |
[in] | onlyDirect | When true, only the direct descendants are returned, otherwise all children, children of children etc. are returned. |
[in] | skipIgnored | When true, entities flagged by IGNORE_LAYERS will not be included in the list |
int SCR_EditableEntityComponent.GetChildrenCount | ( | bool | onlyDirect = false | ) |
Get number of child entities.
[in] | onlyDirect | When true, return only direct children, othwise count recursively in their children as well |
set< SCR_EditableEntityComponent > SCR_EditableEntityComponent.GetChildrenRef | ( | ) |
Get direct reference to entity's immediate children.
Use when performance is important. DO NOT MODIFY THE LIST!
int SCR_EditableEntityComponent.GetCrew | ( | out notnull array< CompartmentAccessComponent > | crewCompartmentAccess, |
bool | ignorePlayers = true |
||
) |
Get crew of vehicle or if in a vehicle get self.
[out] | crewCompartmentAccess | an array of CompartmentAccessComponent of all crew memebers |
[in] | ignorePlayers | will never return player CompartmentAccessComponent if true |
Implemented in SCR_EditableCharacterComponent, and SCR_EditableVehicleComponent.
string SCR_EditableEntityComponent.GetDisplayName | ( | ) |
Get entity name from info component.
When info is undefined, use entity's variable name, or, if that one is also undefined, its class name.
|
static |
Get editable entity component on given entity.
[in] | entity |
SCR_EditableEntityComponentClass SCR_EditableEntityComponent.GetEditableEntityData | ( | IEntity | owner = null | ) |
Get prefab data of this editable entity.
[in] | Owner | entity of this component, used when m_Owner==null, after deletion |
bool SCR_EditableEntityComponent.GetEntityAndChildrenBudgetCost | ( | out notnull array< ref SCR_EntityBudgetValue > | outBudgets, |
IEntity | owner = null |
||
) |
Get budgets for both, entity and it's children.
[out] | outBudgets | Array to be filled with budget values |
bool SCR_EditableEntityComponent.GetEntityBudgetCost | ( | out notnull array< ref SCR_EntityBudgetValue > | outBudgets, |
IEntity | owner = null |
||
) |
Get entity budget costs.
[out] | outBudgets | Array to be filled with budget values |
[in] | owner |
Implemented in SCR_EditableFactionComponent, SCR_EditableGroupComponent, and SCR_EditablePlayerDelegateComponent.
bool SCR_EditableEntityComponent.GetEntityChildrenBudgetCost | ( | out notnull array< ref SCR_EntityBudgetValue > | outBudgets, |
IEntity | owner = null |
||
) |
Get entity budget costs including cost of children (for groups/compositions)
[out] | outBudgets | Array to be filled with budget values |
[in] | owner |
EEditableEntityFlag SCR_EditableEntityComponent.GetEntityFlags | ( | ) |
Get entity flags.
SCR_EditableEntityInteraction SCR_EditableEntityComponent.GetEntityInteraction | ( | IEntity | owner = null | ) |
Get entity interaction rules of this entity.
If it doesn't contain any custom rules, those for its type will be used.
EEditableEntityState SCR_EditableEntityComponent.GetEntityStates | ( | ) |
Check bit array with all currently active states.
EEditableEntityType SCR_EditableEntityComponent.GetEntityType | ( | IEntity | owner = null | ) |
Get entity type.
Avoid basing your functionality on specific entity types! If everyone checked for specific types, adding a new type would mean all conditions have to be revised. Instead, base your system on a function inside this class. Such function can be overrided by inherited classes to give desired result.
[in] | Owner | entity of this component |
Implemented in SCR_EditablePlayerDelegateComponent, and SCR_EditablePreviewComponent.
Faction SCR_EditableEntityComponent.GetFaction | ( | ) |
Get entity's faction.
Implemented in SCR_EditableCharacterComponent, SCR_EditableFactionComponent, SCR_EditableGroupComponent, SCR_EditablePlayerDelegateComponent, SCR_EditableSystemComponent, SCR_EditableTaskComponent, SCR_EditableVehicleComponent, and SCR_EditableWaypointComponent.
float SCR_EditableEntityComponent.GetHealth | ( | ) |
Get entity health.
Implemented in SCR_EditablePlayerDelegateComponent.
vector SCR_EditableEntityComponent.GetIconPos | ( | ) |
Get icon offset.
[in] | Offset |
SCR_UIInfo SCR_EditableEntityComponent.GetInfo | ( | IEntity | owner = null | ) |
Get information about the entity.
When none exist, create a dummy one.
Implemented in SCR_EditablePlayerDelegateComponent, and SCR_EditablePreviewComponent.
bool SCR_EditableEntityComponent.GetLocalTransform | ( | out vector | outTransform[4] | ) |
Get local transformation matrix of editable entity.
[out] | outTransform | Transformation matrix |
string SCR_EditableEntityComponent.GetLogText | ( | string | prefix = "" | ) |
float SCR_EditableEntityComponent.GetMaxDrawDistanceSq | ( | ) |
Get squared maximum distance in which this entity is drawn in editor (e.g., with an icon).
Implemented in SCR_EditableCharacterComponent.
ScriptInvokerEntity SCR_EditableEntityComponent.GetOnDeleted | ( | ) |
Get event called when entity is deleted.
ScriptInvoker SCR_EditableEntityComponent.GetOnUIRefresh | ( | ) |
Get event called when GUI should refresh entity's GUI, i.e., update faction color and call events in GUI widgets.
To be overridden by inherited classes.
Implemented in SCR_EditableCharacterComponent, SCR_EditableGroupComponent, SCR_EditableSpawnPointComponent, SCR_EditableSystemComponent, SCR_EditableTaskComponent, and SCR_EditableVehicleComponent.
ScriptInvoker SCR_EditableEntityComponent.GetOnUIReset | ( | ) |
Get event called when GUI should reset widgets that are used for entity visualization.
To be overridden by inherited classes.
Implemented in SCR_EditablePlayerDelegateComponent.
RplId SCR_EditableEntityComponent.GetOwnerRplId | ( | ) |
GenericEntity SCR_EditableEntityComponent.GetOwnerScripted | ( | ) |
Implemented in SCR_EditableWorldEntityComponent.
void SCR_EditableEntityComponent.GetParentEntities | ( | out notnull array< SCR_EditableEntityComponent > | entities | ) |
Get hierarchy of all parent entities, all the way to the root.
[out] | entities | Array to be filled with parent entities |
SCR_EditableEntityComponent SCR_EditableEntityComponent.GetParentEntity | ( | ) |
Get parent entity.
int SCR_EditableEntityComponent.GetPlayerID | ( | ) |
Get player controlling this entity.
Implemented in SCR_EditableCharacterComponent, SCR_EditablePlayerDelegateComponent, and SCR_EditableVehicleComponent.
bool SCR_EditableEntityComponent.GetPos | ( | out vector | pos | ) |
Get position representing the entity.
[out] | pos | Entity's position |
Implemented in SCR_EditableFactionComponent, SCR_EditableGroupComponent, SCR_EditablePlayerDelegateComponent, SCR_EditablePreviewComponent, and SCR_EditableWaypointComponent.
ResourceName SCR_EditableEntityComponent.GetPrefab | ( | bool | shorten = false | ) |
Get entity prefab.
[in] | shorten | True to include only GUID, not file path |
|
protected |
bool SCR_EditableEntityComponent.GetStatic | ( | ) |
Check if the entity is marked as static.
bool SCR_EditableEntityComponent.GetTransform | ( | out vector | outTransform[4] | ) |
Get world transformation matrix of editable entity.
[out] | outTransform | Transformation matrix |
SCR_EditableEntityComponent SCR_EditableEntityComponent.GetVehicle | ( | ) |
Get vehicle the entity's in.
Implemented in SCR_EditableCharacterComponent, and SCR_EditablePlayerDelegateComponent.
bool SCR_EditableEntityComponent.GetVisibleInHierarchy | ( | ) |
Check visibility setting of the entity in hierarchy (e.g., if an entity is set as visible, but its parent is not, false will be returned).
bool SCR_EditableEntityComponent.GetVisibleSelf | ( | ) |
Check visibility setting of the entity.
bool SCR_EditableEntityComponent.HasAccessInHierarchy | ( | ) |
Check access key of the entity in hierarchy (e.g., if an entity is compatible, but its parent is not, false will be returned).
Compared with the key defined in SCR_AccessKeysEditorComponent.
bool SCR_EditableEntityComponent.HasAccessInHierarchy | ( | EEditableEntityAccessKey | accessKey | ) |
Check acces keys of the entity in hierarchy (e.g., if an entity is compatible, but its parent is not, false will be returned).
[in] | accessKey | Access key which be checked in entity's access key |
bool SCR_EditableEntityComponent.HasAccessSelf | ( | ) |
Check access key of the entity compared to those defined in SCR_AccessKeysEditorComponent.
bool SCR_EditableEntityComponent.HasAccessSelf | ( | EEditableEntityAccessKey | accessKey | ) |
Check access key of the entity.
[in] | accessKey | Access key which be checked in entity's access key |
bool SCR_EditableEntityComponent.HasEntityFlag | ( | EEditableEntityFlag | flag | ) |
Check if a flag is active.
[in] | flag |
bool SCR_EditableEntityComponent.HasEntityState | ( | EEditableEntityState | state | ) |
Check if given entity state is active.
[in] | state |
bool SCR_EditableEntityComponent.IsAttachable | ( | ) |
Returns if current entity is attachable.
Implemented in SCR_EditableTaskComponent, and SCR_EditableWaypointComponent.
bool SCR_EditableEntityComponent.IsAttached | ( | ) |
Returns if current entity is attached.
Implemented in SCR_EditableTaskComponent, and SCR_EditableWaypointComponent.
bool SCR_EditableEntityComponent.IsChildOf | ( | SCR_EditableEntityComponent | entity | ) |
Check if the entity is in hierarchy of given entity.
[in] | entity | Queried entity |
bool SCR_EditableEntityComponent.IsDestroyed | ( | ) |
Check if the entity is destroyed.
Implemented in SCR_EditableExplosiveChargeComponent, SCR_EditableGroupComponent, and SCR_EditableMineComponent.
bool SCR_EditableEntityComponent.IsLayer | ( | ) |
Check if the entity is also a layer, i.e., has some child entities.
bool SCR_EditableEntityComponent.IsRegistered | ( | ) |
Check if the entity is registered.
Registered entity is a child of either root in SCR_EditableEntityCore or one of already registered entities.
bool SCR_EditableEntityComponent.IsReplicated | ( | out RplId | replicationID = -1 | ) |
Check component's replication.
Show an error when it's not registered for replication (e.g., RplComponent is missing)
[out] | replicationID | ID used by Replication.FindItem() |
|
protected |
void SCR_EditableEntityComponent.Log | ( | string | prefix, |
EEditableEntityAccessKey | accessKey | ||
) |
Print out the entity and all its descendants which are compatible with given key.
[in] | prefix | Text added before the printed text |
[in] | accessKey | Access key which be checked in entity's access key |
void SCR_EditableEntityComponent.Log | ( | string | prefix = "" , |
bool | onlyDirect = false , |
||
LogLevel | logLevel = LogLevel::DEBUG |
||
) |
Print out entity information.
[in] | prefix | Text added before the printed text |
[in] | onlyDirect | When true, only the direct descendants are logged, otherwise all children, children of children etc. are logged. |
[in] | logLevel | Log level type |
void SCR_EditableEntityComponent.LogAccessKey | ( | ) |
Print out entity's access key.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Implemented in SCR_EditableGroupComponent.
void SCR_EditableEntityComponent.OnCreatedServer | ( | notnull SCR_PlacingEditorComponent | placedEditorComponent | ) |
[in] | placedEditorComponent |
Implemented in SCR_EditableGroupComponent.
override void SCR_EditableEntityComponent.OnDelete | ( | IEntity | owner | ) |
Implemented in SCR_EditableDecalComponent, and SCR_EditableWaypointComponent.
|
protected |
override void SCR_EditableEntityComponent.OnPostInit | ( | IEntity | owner | ) |
|
protected |
void SCR_EditableEntityComponent.OnRplVisibilityChanged | ( | ) |
|
protected |
|
protected |
|
protected |
void SCR_EditableEntityComponent.RemoveAccessKey | ( | EEditableEntityAccessKey | accessKey | ) |
Remove access key.
Available only on server!
[in] | accessKey | Key to be removed |
|
protected |
|
protected |
void SCR_EditableEntityComponent.RemoveParentEntity | ( | ) |
Remove entity from its parent.
This will unregister the entity from the system, making it not editable. Later, it can be enabled again by adding it to editable parent.
void SCR_EditableEntityComponent.ResetEntityStates | ( | ) |
Reset all entity states.
void SCR_EditableEntityComponent.RestoreParentEntity | ( | ) |
Add the entity to its previous parent after it was unregistered using RemoveParentEntity() Allowed only on server.
override bool SCR_EditableEntityComponent.RplLoad | ( | ScriptBitReader | reader | ) |
override bool SCR_EditableEntityComponent.RplSave | ( | ScriptBitWriter | writer | ) |
bool SCR_EditableEntityComponent.Serialize | ( | out SCR_EditableEntityComponent | outTarget = null , |
out int | outTargetIndex = -1 , |
||
out EEditableEntitySaveFlag | outSaveFlags = 0 |
||
) |
Check if the entity can be serialized during session saving managed by SCR_EditableEntityStruct.
[out] | target | Entity to which this entity is attached to outside of hierarchy structure, e.g., character in a vehicle or waypoint on a target |
[out] | targetIndex | Further specification of the target, e.g., crew position index in a vehicle |
[out] | isDestroyed | Variable to be set to true if the entity is destroyed |
Implemented in SCR_EditableCharacterComponent, and SCR_EditableTaskComponent.
void SCR_EditableEntityComponent.SetAuthor | ( | int | playerID | ) |
Sets AuthorID (player that modified this entity last) in Session.
[in] | authorID |
void SCR_EditableEntityComponent.SetAuthor | ( | SCR_EditableEntityAuthor | author | ) |
Sets AuthorID (player that modified this entity last) from a Save.
[in] | author |
void SCR_EditableEntityComponent.SetAuthorPlatform | ( | PlatformKind | authorPlatform | ) |
void SCR_EditableEntityComponent.SetAuthorPlatformID | ( | string | authorPlatformID | ) |
void SCR_EditableEntityComponent.SetAuthorUID | ( | string | authorUID | ) |
Set Author UID (for normal usage use SetAuthor())
[in] | authorUID |
void SCR_EditableEntityComponent.SetAuthorUpdatedTime | ( | int | updatedLast | ) |
Set Time of last update.
[in] | authorUID |
void SCR_EditableEntityComponent.SetEntityFlag | ( | EEditableEntityFlag | flag, |
bool | toSet | ||
) |
Set entity flag.
[in] | flag | Flag type |
void SCR_EditableEntityComponent.SetEntityState | ( | EEditableEntityState | state, |
bool | toSet | ||
) |
Set value of an entity state.
Multiple states can exist at the same time (e.g., HOVER and SELECTED).
State has only informational value! For example setting it to SELECTED will not actually select the entity.
[in] | state | Target state |
[in] | toSet | True to activate the state, false to deactivate |
|
protected |
void SCR_EditableEntityComponent.SetHierarchyAsDirty | ( | ) |
Mark entity hierarchy as dirty, i.e., modified by user.
Used for example to evaluate if the entity should be saved into a save file in its entirety.
void SCR_EditableEntityComponent.SetHierarchyAsDirtyInParents | ( | ) |
Mark hierarchy in all parents of the entity as dirty, i.e., modified by user.
Used for example to evaluate if the entity should be saved into a save file in its entirety.
void SCR_EditableEntityComponent.SetInfoInstance | ( | SCR_UIInfo | info | ) |
Set information about the entity on entity instance, locally on this machine.
This is a weak ref! The info needs to be held somewhere else, the entity will merely link to it.
[in] | info | Info class |
void SCR_EditableEntityComponent.SetMaxDrawDistance | ( | float | maxDrawDistance | ) |
Set maximum distance in which this entity is drawn in editor (e.g., with an icon).
[in] | maxDrawDistance | Distance in metres |
SCR_EditableEntityComponent SCR_EditableEntityComponent.SetParentEntity | ( | SCR_EditableEntityComponent | parentEntity, |
bool | changedByUser = false |
||
) |
Set parent of the entity.
When placed inside a parent, the entity will inherit some of its settings, like access key or visibility settings. Changing it is allowed only on server.
[in] | parentEntity | New parent. When null, the entity will be moved to the root. |
[in] | changedByUser | True when the change was initiated by user |
Implemented in SCR_EditableCharacterComponent.
|
protected |
|
protected |
void SCR_EditableEntityComponent.SetStatic | ( | bool | isStatic | ) |
Set entity as static.
When static, entity's position is not calculated each frame. Instead, cached position is used. Calling this function with isStatic=true refreshes cached position based on the current position. Use only for entities that are not expected to move! Certain entity types cannot be set as static, and this command will ignore them. Ignored types are GROUP, CHARACTER and VEHICLE.
[in] | isStatic | True to set as static |
void SCR_EditableEntityComponent.SetTransform | ( | vector | transform[4], |
bool | changedByUser = false |
||
) |
Update entity's transformation and broadcast the changes to all clients.
[in] | transform | Target transformation |
[in] | changedByUser | True when the change was initiated by user |
Implemented in SCR_EditableCharacterComponent, SCR_EditableSpawnPointComponent, SCR_EditableTaskComponent, SCR_EditableVehicleComponent, and SCR_EditableWaypointComponent.
|
protected |
Implemented in SCR_EditableDecalComponent, and SCR_EditableWaypointComponent.
|
protected |
Implemented in SCR_EditableCharacterComponent.
void SCR_EditableEntityComponent.SetTransformWithChildren | ( | vector | transform[4] | ) |
Update transformation of the entity and all its editor children and broadcast the changes to all clients.
[in] | transform | Target transformation |
void SCR_EditableEntityComponent.SetVisible | ( | bool | show | ) |
Set entity visibility.
When set to false, the entity will not be shown to the user. Visibility is local to editor user.
[in] | show | true to show, false to hide |
|
protected |
|
protected |
Implemented in SCR_EditablePreviewComponent.
void SCR_EditableEntityComponent.UpdateStaticPos | ( | ) |
Update static cached position.
Doesn't do anything when the entity is not marked as static.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |