Arma Reforger Script API
|
Public Member Functions | |
void | OnPreviewCreated (notnull SCR_EditablePreviewEntity previewEnt) |
Method called once the preview is spawned to initiate all the variables and start evaluate the obstruction. | |
bool | CanBeCreated () |
Return current canbeCreated value. | |
void | SetSuperiorCanBeCreated (bool val) |
Set if the entity can be created, outside of the obstruction system. This is superior to internal m_bCanBeCreated. | |
bool | IsPreviewOutOfRange (out ENotification outNotification=-1) |
bool | IsPreviewVehicle (IEntity ent) |
Check the given preview is vehicle. | |
bool | CanCreate (out ENotification outNotification=-1, out SCR_EPreviewState previewStateToShow=SCR_EPreviewState.PLACEABLE) |
Check the preview position. Is suitable to build the composition here? | |
bool | EvaluateBlockingEntity (IEntity ent) |
Evaluate the entity query found if it really can blocks the spawning of the composition. | |
bool | EvaluateBlockingEntityVehicle (IEntity ent) |
Evaluate blocking entities for vehicles. | |
bool | HasObstructionException (notnull IEntity ent) |
Check if detected entity has set any obstruction exception rulles. | |
bool | TraceCylinder (vector pos, float radius=0.5, float height=2, TraceFlags flags=TraceFlags.ENTS|TraceFlags.OCEAN, BaseWorld world=null) |
Check for intersections within given cylinder. | |
Public Member Functions inherited from SCR_BaseEditorComponent | |
sealed void | OnInitBase () |
sealed void | OnDeleteBase () |
sealed void | OnRequestBase (bool isOpen) |
sealed void | OnOpenedBase () |
sealed void | OnClosedBase () |
sealed void | OnPreActivateBase () |
sealed void | OnActivateBase () |
sealed bool | OnActivateAsyncBase (int attempt) |
sealed void | OnPostActivateBase () |
sealed void | OnDeactivateBase () |
sealed void | OnPostDeactivateBase () |
sealed bool | OnDeactivateAsyncBase (int attempt) |
sealed void | OnEffectBase (SCR_BaseEditorEffect effect) |
SCR_EditorManagerEntity | GetManager () |
Get editor manager this component belongs to. | |
SCR_BaseEditorComponent | FindEditorComponent (TypeName type, bool showError=false, bool modeFirst=false) |
Get the editor manager to which this component belongs. | |
EntityComponentPrefabData | GetEditorComponentData () |
Get prefab data of this component. | |
bool | IsRemoved () |
Check if the component is being deleted. | |
void | ResetEditorComponent () |
Reset values controlled by the component. | |
ScriptInvoker | GetOnEffect () |
Get event called when an effect is activated. | |
void | InitServer () |
void | InitOwner () |
override void | OnPostInit (IEntity owner) |
void | SCR_BaseEditorComponent (IEntityComponentSource src, IEntity ent, IEntity parent) |
void | ~SCR_BaseEditorComponent () |
Protected Member Functions | |
override void | EOnEditorActivate () |
When the component is activated. | |
override void | EOnEditorActivateServer () |
When the component is activated (called on server) | |
override void | EOnEditorOpen () |
When the editor is opened. | |
override void | EOnEditorClose () |
When the editor is closed. | |
override void | EOnEditorOpenServer () |
When the editor is opened (called on server) | |
void | SetInitialCanBeCreatedState (notnull SCR_EditablePreviewEntity previewEnt) |
Set the initial state of the preview can / can't be created (based on the place where player place the preview into the world.) | |
void | GetAllEntitiesToEvaluate (notnull SCR_EditablePreviewEntity rootEnt) |
float | GetEntityProtectionRadius (notnull IEntity ent) |
Calculate a sphere radius about the entity which will be tested for obstruction. | |
bool | IsCompositionTilted (IEntity ent, float entityRadius, vector originalTransofrmAngles, out SCR_EPreviewState previewStateToShow=SCR_EPreviewState.PLACEABLE) |
Check the tilt of the entities in compositions. If it goes over the set limits, the colour of preview material will be changed to warn player. | |
bool | CheckEntityPosition (vector pos, float safeZoneRadius) |
Check entity position in given radius. | |
bool | CheckVehiclePosition () |
Check entity position in given bounding box. | |
bool | TraceEntityOnPosition (vector position, notnull BaseWorld world, float safeZoneRadius) |
Trace at the position of the preview to find any possibly cliping entities. | |
Protected Member Functions inherited from SCR_BaseEditorComponent | |
bool | IsOnEditorManager () |
bool | IsOwner () |
bool | IsProxy () |
bool | IsMaster () |
bool | IsAdmin () |
SCR_BaseEditorComponent | GetParentComponent () |
void | SetParentComponent (SCR_BaseEditorComponent parent) |
void | SendNotification (ENotification notificationID, int selfID=0, int targetID=0, vector position=vector.Zero) |
void | EOnEditorInit () |
When the entity is created. | |
void | EOnEditorDelete () |
When the entity is destroyed. | |
void | EOnEditorRequest (bool isOpen) |
When opening/closing request is sent to server. | |
void | EOnEditorPreActivate () |
Before the component is activated. | |
bool | EOnEditorActivateAsync (int attempt) |
When the component is activated. | |
void | EOnEditorPostActivate () |
When the component is activated, but after EOnEditorActivate() function was called in all components. | |
void | EOnEditorDeactivate () |
When the component is deactivated. | |
bool | EOnEditorDeactivateAsync (int attempt) |
When the component is deactivated. | |
void | EOnEditorPostDeactivate () |
When the component is deactivated, but after the next mode is activated. | |
void | EOnEditorDebug (array< string > debugTexts) |
Every frame while the editor is opened and debug menu is shown. | |
void | EOnEffect (SCR_BaseEditorEffect effect) |
When an effect is created in reaction an an event. | |
void | EOnEditorInitServer () |
When the entity is created (called on server) | |
void | EOnEditorDeleteServer () |
When the entity is destroyed (called on server) | |
void | EOnEditorOpenServerCallback () |
When the editor is opened (called on server after async loading finished on client) | |
void | EOnEditorCloseServer () |
When the editor is closed (called on server) | |
void | EOnEditorCloseServerCallback () |
When the editor is closed (called on server after async loading finished on client) | |
void | EOnEditorDeactivateServer () |
When the component is deactivated (called on server) | |
Protected Attributes | |
float | m_fEntityTiltWarning |
float | m_fTiltDifferenceWarning |
ResourceName | m_sCompositionResourceName |
bool | m_bCanBeCreated = true |
bool | m_bSuperiorCanBeCreated = false |
bool | m_bTraceEntityPosition |
SCR_CampaignBuildingEditorComponent | m_CampaignBuildingComponent |
SCR_FreeRoamBuildingClientTriggerEntity | m_AreaTrigger |
ECantBuildNotificationType | m_eBlockingReason |
SCR_EditablePreviewEntity | m_PreviewEnt |
ref array< ref Tuple3< IEntity, float, vector > > | m_aCompositionEntities = {} |
float | m_fSafeZoneRadius = 0 |
float | m_fCylinderHeight = 0.5 |
float | m_fRollMin |
float | m_fRollMax |
float | m_fPitchMin |
float | m_fPitchMax |
bool | m_bIsVehicle |
vector | m_vTraceOffset = Vector(0, 10, 0) |
vector | m_vCylinderVectorOffset = Vector(0, m_fCylinderHeight * 0.5, 0) |
Protected Attributes inherited from SCR_BaseEditorComponent | |
SCR_EditorBaseEntity | m_Owner |
SCR_EditorManagerEntity | m_Manager |
SCR_BaseEditorComponent | m_Parent |
RplComponent | m_RplComponent |
Static Protected Attributes | |
const float | SEA_LEVEL_OFFSET = 0.01 |
const float | PREVIEW_CHECK_FACTOR = 0.1 |
const float | HEIGHT_ABOVE_GROUND_BUFFER = 0.3 |
const float | HEIGHT_ABOVE_GROUND_VEHICLE_BUFFER = 1 |
const float | BOUNDING_BOX_FACTOR = 0.5 |
const float | BOUNDING_BOX_VEHICLE_FACTOR = 0.8 |
const float | MINIMAL_PROTECTION_RADIUS_TO_EVALUATE = 0.2 |
const float | MAXIMAL_HEIGHT_ABOVE_TERRAIN_TO_EVALUATE = 1 |
const int | MINIMAL_ENTITY_RADIUS_TO_EVALUATE_TILT = 1 |
Additional Inherited Members | |
Static Public Member Functions inherited from SCR_BaseEditorComponent | |
static Managed | GetInstance (TypeName type, bool showError=false, bool modeFirst=false) |
Get the local instance of a component attached on editor manager (SCR_EditorManagerEntity). | |
static Managed | GetInstance (SCR_EditorBaseEntity editorManager, TypeName type, bool showError=false) |
Get instance of a component attached on specific editor manager / mode (SCR_EditorBaseEntity). | |
static int | GetAllInstances (TypeName type, out notnull array< Managed > outComponents) |
Get component instances on editor manager (SCR_EditorBaseEntity) and all its modes (SCR_EditorModeEntity). | |
bool SCR_CampaignBuildingPlacingObstructionEditorComponent.CanBeCreated | ( | ) |
Return current canbeCreated value.
bool SCR_CampaignBuildingPlacingObstructionEditorComponent.CanCreate | ( | out ENotification | outNotification = -1 , |
out SCR_EPreviewState | previewStateToShow = SCR_EPreviewState::PLACEABLE |
||
) |
Check the preview position. Is suitable to build the composition here?
|
protected |
Check entity position in given radius.
|
protected |
Check entity position in given bounding box.
|
protected |
When the component is activated.
Implements SCR_BaseEditorComponent.
|
protected |
When the component is activated (called on server)
Implements SCR_BaseEditorComponent.
|
protected |
When the editor is closed.
Implements SCR_BaseEditorComponent.
|
protected |
When the editor is opened.
Implements SCR_BaseEditorComponent.
|
protected |
When the editor is opened (called on server)
Implements SCR_BaseEditorComponent.
bool SCR_CampaignBuildingPlacingObstructionEditorComponent.EvaluateBlockingEntity | ( | IEntity | ent | ) |
Evaluate the entity query found if it really can blocks the spawning of the composition.
[in] | ent | Entity found during query as potential obstacel to placing. |
bool SCR_CampaignBuildingPlacingObstructionEditorComponent.EvaluateBlockingEntityVehicle | ( | IEntity | ent | ) |
Evaluate blocking entities for vehicles.
[in] | ent | Entity found during query as potential obstacel to placing. |
|
protected |
|
protected |
Calculate a sphere radius about the entity which will be tested for obstruction.
bool SCR_CampaignBuildingPlacingObstructionEditorComponent.HasObstructionException | ( | notnull IEntity | ent | ) |
Check if detected entity has set any obstruction exception rulles.
|
protected |
Check the tilt of the entities in compositions. If it goes over the set limits, the colour of preview material will be changed to warn player.
bool SCR_CampaignBuildingPlacingObstructionEditorComponent.IsPreviewOutOfRange | ( | out ENotification | outNotification = -1 | ) |
bool SCR_CampaignBuildingPlacingObstructionEditorComponent.IsPreviewVehicle | ( | IEntity | ent | ) |
Check the given preview is vehicle.
void SCR_CampaignBuildingPlacingObstructionEditorComponent.OnPreviewCreated | ( | notnull SCR_EditablePreviewEntity | previewEnt | ) |
Method called once the preview is spawned to initiate all the variables and start evaluate the obstruction.
|
protected |
Set the initial state of the preview can / can't be created (based on the place where player place the preview into the world.)
void SCR_CampaignBuildingPlacingObstructionEditorComponent.SetSuperiorCanBeCreated | ( | bool | val | ) |
Set if the entity can be created, outside of the obstruction system. This is superior to internal m_bCanBeCreated.
bool SCR_CampaignBuildingPlacingObstructionEditorComponent.TraceCylinder | ( | vector | pos, |
float | radius = 0::5 , |
||
float | height = 2 , |
||
TraceFlags | flags = TraceFlags::ENTS | TraceFlags::OCEAN , |
||
BaseWorld | world = null |
||
) |
Check for intersections within given cylinder.
Performs 4 diagonal traces along cylinders circumference.
pos | Cylinder center position |
radius | Cylinder radius |
height | Cylinder full height |
flags | Tracing flags |
world | World which is being traced |
|
protected |
Trace at the position of the preview to find any possibly cliping entities.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |