Arma Reforger Script API
|
Static Public Member Functions | |
static Managed | FindComponent (notnull IEntity entity, TypeName componentType, SCR_EComponentFinderQueryFlags queryFlags=SCR_EComponentFinderQueryFlags.ENTITY|SCR_EComponentFinderQueryFlags.SLOTS) |
Find a specific component on the provided entity or the entity's parent/slottedEntities/siblings/rootparents etc. | |
static int | GetChildrenCount (IEntity parent, bool recursive=false) |
Returns number of children the input entity has. | |
static void | DeleteEntityAndChildren (IEntity entity) |
Deletes input parent entity and all children Just a wrapper for RplComponent.DeleteRplEntity(entity, false);. | |
static vector | GetEntitySize (notnull IEntity entity) |
Returns the size of an entity from its bounding box. | |
static vector | GetEntityCenterWorld (notnull IEntity entity) |
Returns the center of the entity from its bounding box in world coordinates. | |
static float | GetEntityRadius (notnull IEntity entity) |
Returns the radius of the entity based on the size of its bounding box. | |
static void | GetHierarchyEntityList (notnull IEntity entity, notnull inout array< IEntity > output) |
Returns a list of all entities in the hierarchy. | |
static void | SnapToGround (notnull IEntity entity, array< IEntity > excludeArray=null, float maxLength=10, vector startOffset="0 0 0", bool onlyStatic=false) |
static void | OrientUpToVector (vector newUp, inout vector mat[4]) |
static IEntity | GetMainParent (IEntity entity, bool self=false) |
Returns the main parent of the input entity. | |
static void | SetHierarchyTransform (notnull IEntity entity, vector newTransform[4]) |
Set transform for the whole hierarchy. | |
static bool | GetRelativeLocalTransform (notnull IEntity owner, notnull IEntity member, out vector relativeTransform[4]) |
Get relative transform from member to owner local space. | |
static RplComponent | GetEntityRplComponent (notnull IEntity entity) |
Atempts to find RplComponent in the fastest possible way. | |
static void | QuickSortEntitiesByDistanceToPoint (notnull inout array< IEntity > arr, vector pos, int low, int high) |
QuickSort algorithm for ordering an array of Entities by distance to the specified world position. | |
Static Protected Member Functions | |
static bool | OnlyStaticCallback (notnull IEntity entity) |
static void | SetHierarchyChildTransform (notnull IEntity entity, vector oldTransform[4], vector newTransform[4], bool recursive=true) |
Set child transformation. | |
static int | Partition (notnull inout array< IEntity > arr, vector pos, int low, int high) |
Method used for sorting part of the provided array of entities based on their distance to the specified position. | |
|
static |
Deletes input parent entity and all children Just a wrapper for RplComponent.DeleteRplEntity(entity, false);.
[in] | entity |
|
static |
Find a specific component on the provided entity or the entity's parent/slottedEntities/siblings/rootparents etc.
[in] | entity | Entity to use to find the component on |
[in] | componentType | Component Class to find |
[in] | queryFlags | Where to find the component on. It can have multiple flags and is checked in order of lowest to highest flag value |
|
static |
Returns number of children the input entity has.
[in] | parent | |
[in] | recursive | checks children's children if set to true, the number of direct children otherwise |
|
static |
Returns the center of the entity from its bounding box in world coordinates.
[in] | entity |
|
static |
Returns the radius of the entity based on the size of its bounding box.
[in] | entity | the entity to measure |
|
static |
Atempts to find RplComponent in the fastest possible way.
[in] | entity | from which RplComponent should be retrived |
|
static |
Returns the size of an entity from its bounding box.
[in] | entity |
|
static |
Returns a list of all entities in the hierarchy.
[in] | entity | |
[in,out] | output |
|
static |
Returns the main parent of the input entity.
[in] | entity | Entity to get the main parent from |
[in] | self | return entity if there is no parent, false otherwise |
|
static |
Get relative transform from member to owner local space.
[in] | owner | Starting entity. |
[in] | member | Ending entity. |
[out] | relativeTransform | transformation from member to owner local space |
|
staticprotected |
[in] | entity |
|
static |
[in] | newUp | |
[in,out] | mat |
|
staticprotected |
Method used for sorting part of the provided array of entities based on their distance to the specified position.
[in,out] | arr | array whose content will be sorted |
[in] | pos | world space position to which distance will be measured |
[in] | low | index from the array that will be used as a starting point for sorting |
[in] | high | index from the array that will be used as the end point for sorting |
|
static |
QuickSort algorithm for ordering an array of Entities by distance to the specified world position.
[in,out] | arr | array whose content will be sorted |
[in] | pos | world space position to which distance will be measured |
[in] | low | index from the array that will be used as a starting point for sorting |
[in] | high | index from the array that will be used as the end point for sorting |
|
staticprotected |
Set child transformation.
[in] | entity | |
[in] | oldTransform | |
[in] | newTransform | |
[in] | recursive |
|
static |
Set transform for the whole hierarchy.
[in] | entity | |
[in] | newTransform |
|
static |
[in] | entity | the entity to snap to the ground |
[in] | excludeArray | |
[in] | maxLength | |
[in] | startOffset | |
[in] | onlyStatic | only check static physics |