Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_CampaignBuildingPlacingObstructionEditorComponent Interface Reference
Inheritance diagram for SCR_CampaignBuildingPlacingObstructionEditorComponent:
[legend]

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).
 

Member Function Documentation

◆ CanBeCreated()

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.CanBeCreated ( )

Return current canbeCreated value.

◆ CanCreate()

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?

◆ CheckEntityPosition()

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.CheckEntityPosition ( vector  pos,
float  safeZoneRadius 
)
protected

Check entity position in given radius.

◆ CheckVehiclePosition()

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.CheckVehiclePosition ( )
protected

Check entity position in given bounding box.

◆ EOnEditorActivate()

override void SCR_CampaignBuildingPlacingObstructionEditorComponent.EOnEditorActivate ( )
protected

When the component is activated.

Implements SCR_BaseEditorComponent.

◆ EOnEditorActivateServer()

override void SCR_CampaignBuildingPlacingObstructionEditorComponent.EOnEditorActivateServer ( )
protected

When the component is activated (called on server)

Implements SCR_BaseEditorComponent.

◆ EOnEditorClose()

override void SCR_CampaignBuildingPlacingObstructionEditorComponent.EOnEditorClose ( )
protected

When the editor is closed.

Implements SCR_BaseEditorComponent.

◆ EOnEditorOpen()

override void SCR_CampaignBuildingPlacingObstructionEditorComponent.EOnEditorOpen ( )
protected

When the editor is opened.

Implements SCR_BaseEditorComponent.

◆ EOnEditorOpenServer()

override void SCR_CampaignBuildingPlacingObstructionEditorComponent.EOnEditorOpenServer ( )
protected

When the editor is opened (called on server)

Implements SCR_BaseEditorComponent.

◆ EvaluateBlockingEntity()

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.EvaluateBlockingEntity ( IEntity  ent)

Evaluate the entity query found if it really can blocks the spawning of the composition.

Parameters
[in]entEntity found during query as potential obstacel to placing.

◆ EvaluateBlockingEntityVehicle()

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.EvaluateBlockingEntityVehicle ( IEntity  ent)

Evaluate blocking entities for vehicles.

Parameters
[in]entEntity found during query as potential obstacel to placing.

◆ GetAllEntitiesToEvaluate()

void SCR_CampaignBuildingPlacingObstructionEditorComponent.GetAllEntitiesToEvaluate ( notnull SCR_EditablePreviewEntity  rootEnt)
protected

◆ GetEntityProtectionRadius()

float SCR_CampaignBuildingPlacingObstructionEditorComponent.GetEntityProtectionRadius ( notnull IEntity  ent)
protected

Calculate a sphere radius about the entity which will be tested for obstruction.

◆ HasObstructionException()

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.HasObstructionException ( notnull IEntity  ent)

Check if detected entity has set any obstruction exception rulles.

◆ IsCompositionTilted()

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.IsCompositionTilted ( IEntity  ent,
float  entityRadius,
vector  originalTransofrmAngles,
out SCR_EPreviewState  previewStateToShow = SCR_EPreviewState::PLACEABLE 
)
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.

◆ IsPreviewOutOfRange()

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.IsPreviewOutOfRange ( out ENotification  outNotification = -1)

◆ IsPreviewVehicle()

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.IsPreviewVehicle ( IEntity  ent)

Check the given preview is vehicle.

◆ OnPreviewCreated()

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.

◆ SetInitialCanBeCreatedState()

void SCR_CampaignBuildingPlacingObstructionEditorComponent.SetInitialCanBeCreatedState ( notnull SCR_EditablePreviewEntity  previewEnt)
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.)

◆ SetSuperiorCanBeCreated()

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.

◆ TraceCylinder()

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.

Parameters
posCylinder center position
radiusCylinder radius
heightCylinder full height
flagsTracing flags
worldWorld which is being traced
Returns
False if an intersection was found, true if the cylinder is devoid of obstacles

◆ TraceEntityOnPosition()

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.TraceEntityOnPosition ( vector  position,
notnull BaseWorld  world,
float  safeZoneRadius 
)
protected

Trace at the position of the preview to find any possibly cliping entities.

Member Data Documentation

◆ BOUNDING_BOX_FACTOR

const float SCR_CampaignBuildingPlacingObstructionEditorComponent.BOUNDING_BOX_FACTOR = 0.5
staticprotected

◆ BOUNDING_BOX_VEHICLE_FACTOR

const float SCR_CampaignBuildingPlacingObstructionEditorComponent.BOUNDING_BOX_VEHICLE_FACTOR = 0.8
staticprotected

◆ HEIGHT_ABOVE_GROUND_BUFFER

const float SCR_CampaignBuildingPlacingObstructionEditorComponent.HEIGHT_ABOVE_GROUND_BUFFER = 0.3
staticprotected

◆ HEIGHT_ABOVE_GROUND_VEHICLE_BUFFER

const float SCR_CampaignBuildingPlacingObstructionEditorComponent.HEIGHT_ABOVE_GROUND_VEHICLE_BUFFER = 1
staticprotected

◆ m_aCompositionEntities

ref array<ref Tuple3<IEntity, float, vector> > SCR_CampaignBuildingPlacingObstructionEditorComponent.m_aCompositionEntities = {}
protected

◆ m_AreaTrigger

SCR_FreeRoamBuildingClientTriggerEntity SCR_CampaignBuildingPlacingObstructionEditorComponent.m_AreaTrigger
protected

◆ m_bCanBeCreated

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.m_bCanBeCreated = true
protected

◆ m_bIsVehicle

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.m_bIsVehicle
protected

◆ m_bSuperiorCanBeCreated

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.m_bSuperiorCanBeCreated = false
protected

◆ m_bTraceEntityPosition

bool SCR_CampaignBuildingPlacingObstructionEditorComponent.m_bTraceEntityPosition
protected

◆ m_CampaignBuildingComponent

SCR_CampaignBuildingEditorComponent SCR_CampaignBuildingPlacingObstructionEditorComponent.m_CampaignBuildingComponent
protected

◆ m_eBlockingReason

ECantBuildNotificationType SCR_CampaignBuildingPlacingObstructionEditorComponent.m_eBlockingReason
protected

◆ m_fCylinderHeight

float SCR_CampaignBuildingPlacingObstructionEditorComponent.m_fCylinderHeight = 0.5
protected

◆ m_fEntityTiltWarning

float SCR_CampaignBuildingPlacingObstructionEditorComponent.m_fEntityTiltWarning
protected

◆ m_fPitchMax

float SCR_CampaignBuildingPlacingObstructionEditorComponent.m_fPitchMax
protected

◆ m_fPitchMin

float SCR_CampaignBuildingPlacingObstructionEditorComponent.m_fPitchMin
protected

◆ m_fRollMax

float SCR_CampaignBuildingPlacingObstructionEditorComponent.m_fRollMax
protected

◆ m_fRollMin

float SCR_CampaignBuildingPlacingObstructionEditorComponent.m_fRollMin
protected

◆ m_fSafeZoneRadius

float SCR_CampaignBuildingPlacingObstructionEditorComponent.m_fSafeZoneRadius = 0
protected

◆ m_fTiltDifferenceWarning

float SCR_CampaignBuildingPlacingObstructionEditorComponent.m_fTiltDifferenceWarning
protected

◆ m_PreviewEnt

SCR_EditablePreviewEntity SCR_CampaignBuildingPlacingObstructionEditorComponent.m_PreviewEnt
protected

◆ m_sCompositionResourceName

ResourceName SCR_CampaignBuildingPlacingObstructionEditorComponent.m_sCompositionResourceName
protected

◆ m_vCylinderVectorOffset

vector SCR_CampaignBuildingPlacingObstructionEditorComponent.m_vCylinderVectorOffset = Vector(0, m_fCylinderHeight * 0.5, 0)
protected

◆ m_vTraceOffset

vector SCR_CampaignBuildingPlacingObstructionEditorComponent.m_vTraceOffset = Vector(0, 10, 0)
protected

◆ MAXIMAL_HEIGHT_ABOVE_TERRAIN_TO_EVALUATE

const float SCR_CampaignBuildingPlacingObstructionEditorComponent.MAXIMAL_HEIGHT_ABOVE_TERRAIN_TO_EVALUATE = 1
staticprotected

◆ MINIMAL_ENTITY_RADIUS_TO_EVALUATE_TILT

const int SCR_CampaignBuildingPlacingObstructionEditorComponent.MINIMAL_ENTITY_RADIUS_TO_EVALUATE_TILT = 1
staticprotected

◆ MINIMAL_PROTECTION_RADIUS_TO_EVALUATE

const float SCR_CampaignBuildingPlacingObstructionEditorComponent.MINIMAL_PROTECTION_RADIUS_TO_EVALUATE = 0.2
staticprotected

◆ PREVIEW_CHECK_FACTOR

const float SCR_CampaignBuildingPlacingObstructionEditorComponent.PREVIEW_CHECK_FACTOR = 0.1
staticprotected

◆ SEA_LEVEL_OFFSET

const float SCR_CampaignBuildingPlacingObstructionEditorComponent.SEA_LEVEL_OFFSET = 0.01
staticprotected

The documentation for this interface was generated from the following file: