|
Arma Reforger Script API
|
Public Member Functions | |
| bool | GetEntityCallsignIndexes (IEntity entity, out int companyCallsignIndex, out int platoonCallsignIndex, out int squadCallsignIndex, out int characterCallsignIndex) |
| Get the callsign indexes assigned to entity. | |
| bool | GetEntityCallsignIndexes (SCR_EditableEntityComponent editableEntity, out int companyCallsignIndex, out int platoonCallsignIndex, out int squadCallsignIndex, out int characterCallsignIndex) |
| Get the callsign indexes assigned to entity. | |
| bool | GetEntityCallsignNames (IEntity entity, out string companyCallsignName, out string platoonCallsignName, out string squadCallsignName, out string characterCallsignName, out string format) |
| Get the callsign names assigned to entity. | |
| bool | GetEntityCallsignNames (SCR_EditableEntityComponent editableEntity, out string companyCallsignName, out string platoonCallsignName, out string squadCallsignName, out string characterCallsignName, out string format) |
| Get the callsign names assigned to editableEntity. | |
| void | AssignCallGroupCallsign (Faction faction, SCR_CallsignGroupComponent masterCallsignComponent, out int companyIndex, out int platoonIndex, out int squadIndex) |
| Uses the faction to get available company, platoon and squad index and makes these unavailable so they are not picked until available again. | |
| void | AssignRandomGroupCallsigns (Faction faction, out int companyIndex, out int platoonIndex, out int squadIndex) |
| void | MakeGroupCallsignAvailible (Faction faction, int companyIndex, int platoonIndex, int squadIndex) |
| Makes the given callsign indexes available again for the faction. | |
| void | SetPlayerCallsign (int playerId, int companyIndex, int platoonIndex, int squadIndex, int characterNumber, ERoleCallsign characterRole=ERoleCallsign.NONE) |
| bool | GetPlayerCallsign (int playerId, out int companyIndex, out int platoonIndex, out int squadIndex, out int characterNumber=-1, out ERoleCallsign characterRole=ERoleCallsign.NONE) |
| ScriptInvokerBase< SCR_GroupsManagerComponent_OnPlayerCallsignChanged > | GetOnPlayerCallsignChanged () |
| Returns ScriptInvoker on player callsign changed. | |
| override void | EOnInit (IEntity owner) |
| override void | OnPostInit (IEntity owner) |
| void | ~SCR_CallsignManagerComponent () |
Public Member Functions inherited from SCR_BaseGameModeComponent | |
| SCR_BaseGameMode | GetGameMode () |
| void | OnGameEnd () |
| Called on all machines when the world ends. | |
| void | OnGameStateChanged (SCR_EGameModeState state) |
| Called when game mode state changes called on all machines. | |
| void | OnGameModeStart () |
| Called on every machine when game mode starts. | |
| void | OnGameModeEnd (SCR_GameModeEndData data) |
| Called when game mode ends. | |
| void | OnPlayerConnected (int playerId) |
| Called after a player is connected. | |
| void | OnPlayerAuditSuccess (int playerId) |
| Event is called when player connecting Session hosting current Game Mode where is required authentication verification via. | |
| void | OnPlayerAuditFail (int playerId) |
| Event is called when player connecting Session hosting current Game Mode AuditFail() call may be called under two occasions: 1) verification is required but failed (account is not valid, player is banned, internet issues) 2) player cannot be verified as authentication is not required or possible - where it may be valid behavior (server online connectivity turned off for example) Basically non-audited player cannot access persistency/ etc. | |
| void | OnPlayerAuditTimeouted (int playerId) |
| Event is called when player connected to Session was kicked and did not reconnected in time This mean that slot reservation can be canceled. | |
| void | OnPlayerAuditRevived (int playerId) |
| Event is called when player reconnected successfully back to Session after kick This mean that slot reservation need to be finished (closed). | |
| void | OnPlayerRegistered (int playerId) |
| Called on every machine after a player is registered (identity, name etc.). | |
| void | OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout) |
| Called after a player is disconnected. | |
| bool | PreparePlayerEntity_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity) |
| void | OnSpawnPlayerEntityFailure_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, IEntity entity, SCR_SpawnData data, SCR_ESpawnResult reason) |
| void | OnPlayerSpawnFinalize_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity) |
| bool | HandlePlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator instigator) |
| See SCR_BaseGameMode.HandlePlayerKilled. | |
| void | OnPlayerKilled (notnull SCR_InstigatorContextData instigatorContextData) |
| Called after a player gets killed. | |
| void | OnPlayerKilledHandled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator instigator) |
| Called after player gets killed in cases where the kill was handled by the game mode, supressing the default OnPlayerKilled behaviour. | |
| void | OnPlayerDeleted (int playerId, IEntity player) |
| Called after a player gets deleted. | |
| void | OnPlayerRoleChange (int playerId, EPlayerRole roleFlags) |
| Called when player role changes. | |
| void | OnWorldPostProcess (World world) |
| Called once loading of all entities of the world have been finished (still within the loading) | |
| void | OnControllableSpawned (IEntity entity) |
| When a controllable entity is spawned, this event is raised. | |
| void | OnControllableDestroyed (notnull SCR_InstigatorContextData instigatorContextData) |
| When a controllable entity is destroyed, this event is raised. | |
| void | OnControllableDeleted (IEntity entity) |
| Prior to a controllable entity being DELETED, this event is raised. | |
| void | SCR_BaseGameModeComponent (IEntityComponentSource src, IEntity ent, IEntity parent) |
Public Attributes | |
| SCR_GroupsManagerComponent | m_GroupManager |
Protected Member Functions | |
| void | AssignFirstAvailableGroupCallsign (Faction faction, out int companyIndex, out int platoonIndex, out int squadIndex) |
| void | AssignCompanySpecificGroupCallsign (Faction faction, out int specificCompanyIndex, out int platoonIndex, out int squadIndex) |
| void | RemoveAvailableGroupCallsign (Faction faction, int companyIndex, int platoonIndex, int squadIndex) |
| void | AssignRandomDuplicateCallsign (Faction faction, out int company, out int platoon, out int squad) |
| If all callsigns are taken then assign a random callsign. This is an edge case safety as otherwise entities will be without callsigns. | |
| void | OnPlayerSpawn (int playerId, IEntity playerEntity) |
| Assign callsign for players when they are spawned (Server Only) | |
| void | OnPlayerLeftGame (int playerId) |
| void | FillAvailableCallsigns () |
Protected Attributes | |
| ref map< Faction, ref SCR_FactionCallsignData > | m_mAvailableCallsigns = new map<Faction, ref SCR_FactionCallsignData> |
| All available callsigns are stored here. | |
| ref array< ref array< int > > | m_aDuplicateCallsigns = {} |
| Assigned Duplicate callsigns. If all callsigns are assigned then this stores any assigned dupplicates. | |
| ref map< int, ref SCR_PlayerCallsignData > | m_mPlayerCallsignData = new map<int, ref SCR_PlayerCallsignData> |
| Holds all the callsigns that are assigned to players. | |
| ref ScriptInvokerBase< SCR_GroupsManagerComponent_OnPlayerCallsignChanged > | m_OnPlayerCallsignChanged = new ScriptInvokerBase<SCR_GroupsManagerComponent_OnPlayerCallsignChanged>() |
Protected Attributes inherited from SCR_BaseGameModeComponent | |
| SCR_BaseGameMode | m_pGameMode |
| The game mode entity this component is attached to. | |
| void SCR_CallsignManagerComponent.~SCR_CallsignManagerComponent | ( | ) |
| void SCR_CallsignManagerComponent.AssignCallGroupCallsign | ( | Faction | faction, |
| SCR_CallsignGroupComponent | masterCallsignComponent, | ||
| out int | companyIndex, | ||
| out int | platoonIndex, | ||
| out int | squadIndex ) |
Uses the faction to get available company, platoon and squad index and makes these unavailable so they are not picked until available again.
| [in] | faction | faction to assign callsigns |
| [out] | companyIndex | to assign |
| [out] | platoonIndex | to assign |
| [out] | squadIndex | to assign |
|
protected |
|
protected |
|
protected |
If all callsigns are taken then assign a random callsign. This is an edge case safety as otherwise entities will be without callsigns.
| void SCR_CallsignManagerComponent.AssignRandomGroupCallsigns | ( | Faction | faction, |
| out int | companyIndex, | ||
| out int | platoonIndex, | ||
| out int | squadIndex ) |
| [in] | faction | |
| [out] | companyIndex | |
| [out] | platoonIndex | |
| [out] | squadIndex |
| override void SCR_CallsignManagerComponent.EOnInit | ( | IEntity | owner | ) |
|
protected |
| bool SCR_CallsignManagerComponent.GetEntityCallsignIndexes | ( | IEntity | entity, |
| out int | companyCallsignIndex, | ||
| out int | platoonCallsignIndex, | ||
| out int | squadCallsignIndex, | ||
| out int | characterCallsignIndex ) |
Get the callsign indexes assigned to entity.
| [in] | entity | IEntity to get callsign off |
| [out] | company | index |
| [out] | platoon | index |
| [out] | squad | index |
| [out] | character | index, either role or character index, will return -1 if not a character |
| bool SCR_CallsignManagerComponent.GetEntityCallsignIndexes | ( | SCR_EditableEntityComponent | editableEntity, |
| out int | companyCallsignIndex, | ||
| out int | platoonCallsignIndex, | ||
| out int | squadCallsignIndex, | ||
| out int | characterCallsignIndex ) |
Get the callsign indexes assigned to entity.
| [in] | editableEntity | SCR_EditableEntityComponent to get callsign off |
| [out] | company | index |
| [out] | platoon | index |
| [out] | squad | index |
| [out] | character | index, either role or character index, will return -1 if not a character |
| bool SCR_CallsignManagerComponent.GetEntityCallsignNames | ( | IEntity | entity, |
| out string | companyCallsignName, | ||
| out string | platoonCallsignName, | ||
| out string | squadCallsignName, | ||
| out string | characterCallsignName, | ||
| out string | format ) |
Get the callsign names assigned to entity.
| [in] | entity | IEntity to get callsign off |
| [out] | company | name |
| [out] | platoon | name |
| [out] | squad | name |
| [out] | character | name (Optinal if callsign assigned to a character) |
| [out] | format |
| bool SCR_CallsignManagerComponent.GetEntityCallsignNames | ( | SCR_EditableEntityComponent | editableEntity, |
| out string | companyCallsignName, | ||
| out string | platoonCallsignName, | ||
| out string | squadCallsignName, | ||
| out string | characterCallsignName, | ||
| out string | format ) |
Get the callsign names assigned to editableEntity.
| [in] | editableEntity | SCR_EditableEntityComponent to get callsign off |
| [out] | company | name |
| [out] | platoon | name |
| [out] | squad | name |
| [out] | character | name (Optinal if callsign assigned to a character) |
| [out] | format |
| ScriptInvokerBase< SCR_GroupsManagerComponent_OnPlayerCallsignChanged > SCR_CallsignManagerComponent.GetOnPlayerCallsignChanged | ( | ) |
Returns ScriptInvoker on player callsign changed.
| bool SCR_CallsignManagerComponent.GetPlayerCallsign | ( | int | playerId, |
| out int | companyIndex, | ||
| out int | platoonIndex, | ||
| out int | squadIndex, | ||
| out int | characterNumber = -1, | ||
| out ERoleCallsign | characterRole = ERoleCallsign::NONE ) |
| [in] | playerId | |
| [out] | companyIndex | |
| [out] | platoonIndex | |
| [out] | squadIndex | |
| [out] | characterNumber | |
| [out] | characterRole |
| void SCR_CallsignManagerComponent.MakeGroupCallsignAvailible | ( | Faction | faction, |
| int | companyIndex, | ||
| int | platoonIndex, | ||
| int | squadIndex ) |
Makes the given callsign indexes available again for the faction.
Called when the entity with the callsign is destroyed or switches factions
| [in] | faction | faction of callsigns |
| [in] | companyIndex | to make available |
| [in] | platoonIndex | to make available |
| [in] | squadIndex | to make available |
|
protected |
|
protected |
Assign callsign for players when they are spawned (Server Only)
| override void SCR_CallsignManagerComponent.OnPostInit | ( | IEntity | owner | ) |
|
protected |
| void SCR_CallsignManagerComponent.SetPlayerCallsign | ( | int | playerId, |
| int | companyIndex, | ||
| int | platoonIndex, | ||
| int | squadIndex, | ||
| int | characterNumber, | ||
| ERoleCallsign | characterRole = ERoleCallsign::NONE ) |
| [in] | playerId | |
| [in] | companyIndex | |
| [in] | platoonIndex | |
| [in] | squadIndex | |
| [in] | characterNumber | |
| [in] | characterRole |
|
protected |
Assigned Duplicate callsigns. If all callsigns are assigned then this stores any assigned dupplicates.
| SCR_GroupsManagerComponent SCR_CallsignManagerComponent.m_GroupManager |
|
protected |
All available callsigns are stored here.
|
protected |
Holds all the callsigns that are assigned to players.
|
protected |