Arma Reforger Script API
|
Service providing group of defenders defined in faction. Requires SCR_EnableDefenderAction on ActionManager for players to manage its functionality. More...
Public Member Functions | |
SCR_ECharacterRank | GetMinimumRank () |
bool | UserRankCheck (IEntity user) |
OnDefenderGroupSpawnedInvoker | GetOnDefenderGroupSpawned () |
void | SetWaypoint (SCR_AIWaypoint wp) |
Assign custom waypoint to be used by defender group. | |
void | AssignSupplyComponent (notnull SCR_CampaignSuppliesComponent supplyComp) |
Assign supply component to handle supplies of spawner. | |
SCR_CampaignSuppliesComponent | GetSpawnerSupplyComponent () |
float | GetSpawnerSupplies () |
Get available supplies. | |
void | AddSupplies (float value) |
Set the spawner supplies value. | |
bool | IsSpawningEnabled () |
Returns true if spawner is currently activated. | |
void | EnableSpawning (bool enable, int playerID) |
Enable spawning of defender groups. | |
bool | IsProxy () |
SCR_EntitySpawnerSlotComponent | GetFreeSlot () |
void | ~SCR_DefenderSpawnerComponent () |
Public Member Functions inherited from SCR_SlotServiceComponent | |
void | RegisterSlot (SCR_EntitySpawnerSlotComponent slot) |
Register slot to be used for service. | |
Public Member Functions inherited from SCR_ServicePointComponent | |
Faction | GetFaction () |
ResourceName | GetDelegatePrefab () |
ScriptInvoker< SCR_ServicePointComponent, SCR_MilitaryBaseComponent > | GetOnBaseRegistered () |
ScriptInvoker< SCR_ServicePointComponent, SCR_MilitaryBaseComponent > | GetOnBaseUnregistered () |
ScriptInvoker | GetOnServiceStateChanged () |
SCR_EServicePointType | GetType () |
EEditableEntityLabel | GetLabel () |
SCR_EServicePointStatus | GetServiceState () |
void | SetServiceState (SCR_EServicePointStatus state) |
Set the current operational state of the service. | |
void | ServiceStateChanged () |
Called from RplProp event. | |
void | SetDelegate (notnull SCR_ServicePointDelegateComponent delegate) |
override void | OnBaseRegistered (notnull SCR_MilitaryBaseComponent base) |
override void | OnBaseUnregistered (notnull SCR_MilitaryBaseComponent base) |
void | RegisterService () |
void | SetServiceOnline () |
Switch service to online status. | |
override void | OnPostInit (IEntity owner) |
override void | OnDelete (IEntity owner) |
Public Member Functions inherited from SCR_MilitaryBaseLogicComponent | |
void | RegisterBase (notnull SCR_MilitaryBaseComponent base) |
void | OnBaseRegistered (notnull SCR_MilitaryBaseComponent base) |
void | UnregisterBase (notnull SCR_MilitaryBaseComponent base) |
void | OnBaseUnregistered (notnull SCR_MilitaryBaseComponent base) |
int | GetBases (out array< SCR_MilitaryBaseComponent > bases) |
void | OnBaseFactionChanged (Faction faction) |
override void | EOnInit (IEntity owner) |
override void | OnPostInit (IEntity owner) |
void | ~SCR_MilitaryBaseLogicComponent () |
Protected Member Functions | |
void | AssignDefenderGroupDataFromOwningFaction () |
Set Defender group data from Entity catalog on owning faction. | |
void | SpawnUnit (ResourceName unitResource, bool consumeSupplies=true) |
Spawn Units with given ResourceName and assign it to group. | |
void | OnMovingCharacterDeath (SCR_CharacterControllerComponent characterController, IEntity killerEntity, Instigator killer) |
void | OnMoveFinished (SCR_AIActionBase action) |
void | ReinforceGroup () |
Refills AI's in defender group. | |
void | SpawnGroup () |
Spawn defender AI group from faction prefab. | |
AIWaypoint | GetWaypoint () |
SCR_EDefenderSpawnerState | GetPlayerDistanceState () |
void | HandleGroup () |
Manages automatic group spawning. | |
override void | OnFactionChanged (FactionAffiliationComponent owner, Faction previousFaction, Faction faction) |
override void | EOnInit (IEntity owner) |
override void | OnPostInit (IEntity owner) |
Protected Member Functions inherited from SCR_SlotServiceComponent | |
bool | CanBeSlotRegistered (notnull SCR_EntitySpawnerSlotComponent slot) |
Prevents registration of slots that are too far from service, or are already child of another slot service. | |
bool | SlotSearchCallback (IEntity ent) |
Callback function for Query used in RegisterNearbySlots Should callback return true, QueryEntitiesBySphere will continue with query. | |
void | RegisterNearbySlots () |
Registers slots in near distance. Kept for sake of client checks. Skips slots that are in hiearchy of any entity with SCR_SlotService or classes inherited from it. | |
void | RegisterChildSlots () |
Registers slots initially created as children. There slots cannot be used by any other spawner and shouldn't change in runtime. | |
void | OnSlotUpdate (SCR_EntitySpawnerSlotComponent slot, vector position) |
Called, if slot possition was changed. If it fails to meet previously required criteria in CanBeSlotRegistered, slot wont be used anymore. | |
void | OnSlotRemoved (SCR_EntitySpawnerSlotComponent slot) |
Called, if slot possition was changed. If it fails to meet previously required criteria in CanBeSlotRegistered, slot wont be used anymore. | |
override void | EOnInit (IEntity owner) |
void | OnFactionChanged (FactionAffiliationComponent owner, Faction previousFaction, Faction faction) |
Static Protected Attributes | |
static const int | SPAWN_CHECK_INTERVAL = 1000 |
static const int | SPAWN_GROUP_JOIN_TIMEOUT = 20 |
static const int | SPAWN_RADIUS_MIN = Math.Pow(500, 2) |
static const int | SPAWN_RADIUS_MAX = Math.Pow(1000, 2) |
Static Protected Attributes inherited from SCR_ServicePointComponent | |
static bool | s_bSpawnAsOffline |
Additional Inherited Members | |
Static Public Member Functions inherited from SCR_ServicePointComponent | |
static void | SpawnAsOffline (bool val) |
The service will not be registered on init. For an example for Free Roam building - the registration will happen once the service is fully build. | |
Service providing group of defenders defined in faction. Requires SCR_EnableDefenderAction on ActionManager for players to manage its functionality.
void SCR_DefenderSpawnerComponent.~SCR_DefenderSpawnerComponent | ( | ) |
void SCR_DefenderSpawnerComponent.AddSupplies | ( | float | value | ) |
Set the spawner supplies value.
[in] | value |
|
protected |
Set Defender group data from Entity catalog on owning faction.
void SCR_DefenderSpawnerComponent.AssignSupplyComponent | ( | notnull SCR_CampaignSuppliesComponent | supplyComp | ) |
Assign supply component to handle supplies of spawner.
Currently uses Campaign specific supplies (temporarily)
[in] | supplyComp |
void SCR_DefenderSpawnerComponent.EnableSpawning | ( | bool | enable, |
int | playerID | ||
) |
Enable spawning of defender groups.
[in] | enable | bool to enable or disable spawning |
[in] | playerID | id of player using this action |
|
protected |
Implements SCR_SlotServiceComponent.
SCR_EntitySpawnerSlotComponent SCR_DefenderSpawnerComponent.GetFreeSlot | ( | ) |
SCR_ECharacterRank SCR_DefenderSpawnerComponent.GetMinimumRank | ( | ) |
OnDefenderGroupSpawnedInvoker SCR_DefenderSpawnerComponent.GetOnDefenderGroupSpawned | ( | ) |
|
protected |
float SCR_DefenderSpawnerComponent.GetSpawnerSupplies | ( | ) |
Get available supplies.
SCR_CampaignSuppliesComponent SCR_DefenderSpawnerComponent.GetSpawnerSupplyComponent | ( | ) |
|
protected |
|
protected |
Manages automatic group spawning.
bool SCR_DefenderSpawnerComponent.IsProxy | ( | ) |
bool SCR_DefenderSpawnerComponent.IsSpawningEnabled | ( | ) |
Returns true if spawner is currently activated.
|
protected |
Implements SCR_ServicePointComponent.
|
protected |
|
protected |
|
protected |
Implements SCR_ServicePointComponent.
|
protected |
Refills AI's in defender group.
void SCR_DefenderSpawnerComponent.SetWaypoint | ( | SCR_AIWaypoint | wp | ) |
Assign custom waypoint to be used by defender group.
[in] | wp |
|
protected |
Spawn defender AI group from faction prefab.
Also handles price per spawned unit. Should some units be despawned because of player distance, spawn price will be reduced by it
|
protected |
Spawn Units with given ResourceName and assign it to group.
[in] | unitResource | resource name of unit to be spawned |
[in] | consumeSupplies | if false, spawning this unit won't consume supplies. Is used for respawning units, which were previously despawned to save performance |
bool SCR_DefenderSpawnerComponent.UserRankCheck | ( | IEntity | user | ) |
[in] | user |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |