5class SCR_ReinforceRequestedTaskEntity : SCR_BaseRequestedTaskEntity
28 SCR_XPHandlerComponent comp = SCR_XPHandlerComponent.Cast(
GetGame().
GetGameMode().FindComponent(SCR_XPHandlerComponent));
34 if (!assigneePlayerIDs)
37 foreach (
int playerID : assigneePlayerIDs)
39 comp.AwardXP(playerID,
SCR_EXPRewards.REINFORCE_TASK_COMPLETED, 1.0,
false);
49 super.SetTaskState(state);
83 SCR_ChimeraCharacter character;
84 CharacterControllerComponent charControl;
86 if (!assigneePlayerIDs)
89 foreach (
int playerId : assigneePlayerIDs)
91 character = SCR_ChimeraCharacter.Cast(pManager.GetPlayerControlledEntity(playerId));
95 charControl = character.GetCharacterController();
96 if (!charControl || charControl.IsDead())
112 #ifdef REINFORCE_TASK_DEBUG
113 Print(
"Reinforce requested task, playerId "+playerId+
" is registered to evaluation player list",
LogLevel.DEBUG);
118 int halfAssignedPlayers = assigneePlayerIDs.Count() * 0.5;
120 #ifdef REINFORCE_TASK_DEBUG
127 #ifdef REINFORCE_TASK_DEBUG
128 Print(
"Reinforce requested task, completed",
LogLevel.DEBUG);
139 #ifdef REINFORCE_TASK_DEBUG
155 #ifdef REINFORCE_TASK_DEBUG
156 Print(
"Reinforce requested task, CheckReinforcementArea", level:
LogLevel.DEBUG);
162 SCR_NotificationsComponent.SendLocal(
ENotification.GROUP_TASK_REINFORCE_ENTERED_AREA);
170 int victimPlayerID = instigatorContextData.GetVictimPlayerID();
172 if (victimPlayerID == 0)
183 #ifdef REINFORCE_TASK_DEBUG
184 PrintFormat(
"Reinforce requested task, playerID:%1 was killed and added to dead player list", victimPlayerID, level:
LogLevel.DEBUG);
216 bool loaded = super.RplLoad(reader);
226 super.EOnInit(owner);
239 if (!
System.IsConsoleApp())
ArmaReforgerScripted GetGame()
override bool RplLoad(ScriptBitReader reader)
override void SetTaskState(SCR_ETaskState state)
WorldTimestamp m_TaskActivatedTimestamp
SCR_AttackTaskEntityClass PERIODICAL_CHECK_INTERVAL
SCR_BaseGameMode GetGameMode()
RplComponent m_RplComponent
void OnTaskAssigneeAdded(SCR_Task task, SCR_TaskExecutor executor, int requesterID)
void OnTaskAssigneeRemoved(SCR_Task task, SCR_TaskExecutor executor, int requesterID)
void SCR_GameModeCampaign(IEntitySource src, IEntity parent)
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void OnControllableDestroyed(IEntity entity, IEntity killerEntity, Instigator instigator, notnull SCR_InstigatorContextData instigatorContextData)
SCR_GroupsManagerComponent m_GroupsManager
ref array< int > m_aArrivedPlayers
void CheckReinforcementArea()
bool m_bWasAnyPlayerInArea
bool m_bIsAreaCheckRunning
ref array< int > m_aDeadPlayers
array of playerIDs
void ~SCR_ReinforceRequestedTaskEntity()
bool m_bWasLocalPlayerInArea
array< int > GetTaskAssigneePlayerIDs()
void SCR_Task(IEntitySource src, IEntity parent)
bool IsTaskAssignedTo(SCR_TaskExecutor executor, out SCR_TaskExecutor match=null)
SCR_TaskSystem m_TaskSystem
proto external Managed FindComponent(typename typeName)
proto external vector GetOrigin()
ScriptInvokerBase< SCR_BaseGameMode_OnControllableDestroyed > GetOnControllableDestroyed()
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
static IEntity GetLocalControlledEntity()
override void EOnInit(IEntity owner)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
SCR_FieldOfViewSettings Attribute