8 [
Attribute(
"1",
desc:
"How often will the spawn's position be updated to match assigned player's position (in seconds).",
category:
"Player Spawn Point")]
9 protected float m_fUpdateInterval;
11 [
Attribute(
desc:
"Spawn point visualization. Original 'Info' attribute will be ignored.",
category:
"Player Spawn Point")]
14 [
RplProp(onRplName:
"OnSetPlayerID")]
20 protected Faction m_CachedFaction;
21 protected IEntity m_TargetPlayer;
27 return m_TargetPlayer;
67 LinkInfo(m_PlayerInfo);
84 Print(
string.Format(
"Couldn't enable point, mismatching playerId(s), expected: %1, got: %2",
m_iPlayerID, playerId),
LogLevel.WARNING);
89 m_TargetPlayer = playerEntity;
100 Print(
string.Format(
"Couldn't disable point, mismatching playerId(s), expected: %1, got: %2",
m_iPlayerID, playerId),
LogLevel.WARNING);
106 m_CachedFaction = null;
107 m_TargetPlayer = null;
164 super.GetPositionAndRotation(pos, rot);
184 if (!compartmentAccessTarget)
194 if (!super.CanReserveFor_S(playerId))
202 array<BaseCompartmentSlot> compartments = {};
203 int count = compartmentManager.GetCompartments(compartments);
204 for (
int i = 0; i < count; i++)
223 #ifdef _ENABLE_RESPAWN_LOGS
224 Print(
string.Format(
"%1::PrepareSpawnedEntity_S(playerId: %2, data: %3, entity: %4)",
Type().
ToString(),
225 requestComponent.GetPlayerId(),
data, entity),
LogLevel.NORMAL);
229 if (!super.PrepareSpawnedEntity_S(requestComponent,
data, entity))
234 if (!compartmentAccessPlayer)
249 #ifdef _ENABLE_RESPAWN_LOGS
250 Print(
string.Format(
"%1::PrepareSpawnedEntityForVehicle_S(playerId: %2, data: %3, entity: %4, vehicle: %5)",
Type().
ToString(),
251 requestComponent.GetPlayerId(),
data, entity, vehicle),
LogLevel.NORMAL);
257 array<BaseCompartmentSlot> compartments = {};
258 int count = compartmentManager.GetCompartments(compartments);
259 for (
int i = 0; i < count; i++)
262 if (!slot.
IsOccupied() && (!slot.IsReserved() || slot.IsReservedBy(entity)))
265 return accessComponent.GetInVehicle(vehicle, slot,
true, -1,
ECloseDoorAfterActions.INVALID, world.IsGameTimePaused());
275 if (!super.CanFinalizeSpawn_S(requestComponent,
data, entity))
280 if (accessComponent && accessComponent.IsGettingIn())
ArmaReforgerScripted GetGame()
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
override int GetPlayerID()
Get all prefabs that have the spawner data
void SCR_FactionManager(IEntitySource src, IEntity parent)
SCR_HintSequenceComponentClass m_bIsActive
void ActivateSpawnPoint()
void DeactivateSpawnPoint()
void UpdateSpawnPosBroadcast(vector pos)
void EnablePoint(int playerId, IEntity playerEntity)
override bool CanFinalizeSpawn_S(SCR_SpawnRequestComponent requestComponent, SCR_SpawnData data, IEntity entity)
bool PrepareSpawnedEntityForVehicle_S(SCR_SpawnRequestComponent requestComponent, SCR_SpawnData data, IEntity entity, Vehicle vehicle)
override string GetSpawnPointName()
override bool PrepareSpawnedEntity_S(SCR_SpawnRequestComponent requestComponent, SCR_SpawnData data, IEntity entity)
Vehicle GetTargetVehicle()
void ~SCR_PlayerSpawnPoint()
void SetPlayerID(int playerID)
override void OnFinalizeSpawnDone_S(SCR_SpawnRequestComponent requestComponent, SCR_SpawnData data, IEntity entity)
void DisablePoint(int playerId)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
proto external vector GetAngles()
Same as GetYawPitchRoll(), but returns rotation vector around X, Y and Z axis.
proto external vector GetOrigin()
Spawn point entity defines positions on which players can possibly spawn.
bool CanReserveFor_S(int playerId, out SCR_ESpawnResult result=SCR_ESpawnResult.SPAWN_NOT_ALLOWED)
void SetFaction(Faction faction)
bool IsSpawnPointActive()
void GetPositionAndRotation(out vector pos, out vector rot)
enum EPhysicsLayerPresets Vehicle
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute
EntityFlags
Various entity flags.
SCR_EditorManagerCore m_iPlayerID
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
proto external string ToString()
Plain C++ pointer, no weak pointers, no memory management.