Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EditorHasLastNotificationLocationActionCondition.c
Go to the documentation of this file.
1 [BaseContainerProps(), BaseContainerCustomStringTitleField("Has notification location")]
4 {
5  [Attribute("5", desc: "How long will the hint be active if it was valid in seconds")]
6  protected int m_DisplayTime;
7 
8  protected SCR_NotificationsComponent m_NotificationsComponent;
9  protected vector m_vLocation = vector.Zero;
10  protected bool m_bShowLocation;
11  protected bool m_bIsListeningToDisable;
12 
13  override bool IsAvailable(SCR_AvailableActionsConditionData data)
14  {
15  if (!data)
16  return false;
17 
18  if (!m_NotificationsComponent)
19  {
20  m_NotificationsComponent = SCR_NotificationsComponent.GetInstance();
21  if (!m_NotificationsComponent)
22  return false;
23  }
24 
25  vector location;
26  m_NotificationsComponent.GetLastNotificationLocation(location);
27  if (location != m_vLocation)
28  {
29  m_vLocation = location;
30  m_bShowLocation = true;
31 
32  if (m_DisplayTime > 0)
33  {
34  if (m_bIsListeningToDisable)
35  GetGame().GetCallqueue().Remove(SetLocationDisabled);
36 
37  m_bIsListeningToDisable = true;
38  GetGame().GetCallqueue().CallLater(SetLocationDisabled, m_DisplayTime * 1000);
39  }
40  }
41 
42  return GetReturnResult(m_vLocation != vector.Zero && m_bShowLocation);
43  }
44 
45  protected void SetLocationDisabled()
46  {
47  m_bShowLocation = false;
48  m_bIsListeningToDisable = false;
49  }
50 };
SCR_AvailableActionsConditionData
Definition: SCR_AvailableActionsConditionData.c:5
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
BaseContainerCustomStringTitleField
class SCR_HitZoneGroupNameHolder BaseContainerCustomStringTitleField("USE INHERENT VERSION ONLY!")
Definition: SCR_HitZoneGroupNameHolder.c:27
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_AvailableActionCondition
A single available action condition representation.
Definition: SCR_AvailableActionsCondition.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
SCR_EditorHasLastNotificationLocationActionCondition
Returns true if has last notification location and time was less then given var.
Definition: SCR_EditorHasLastNotificationLocationActionCondition.c:3
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468