Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionLimiter.c
Go to the documentation of this file.
3{
4 [Attribute(defvalue: "0", desc: "How much time before assigned actions can be activated again.", params: "0 inf")]
5 float m_fActivationLimitDelay;
6
7 [Attribute(desc: "Actions with limited activation")]
8 ref array<ref SCR_ScenarioFrameworkActionBase> m_aActions;
9
10 WorldTimestamp m_LimitedUntil;
11
12 //------------------------------------------------------------------------------------------------
13 override void OnActivate(IEntity object)
14 {
15 const WorldTimestamp currentTimestamp = GetGame().GetWorld().GetTimestamp();
16 if (m_LimitedUntil && currentTimestamp.LessEqual(m_LimitedUntil))
17 return;
18
19 m_LimitedUntil = currentTimestamp.PlusSeconds(m_fActivationLimitDelay);
20
21 foreach (SCR_ScenarioFrameworkActionBase action : m_aActions)
22 {
23 action.OnActivate(object);
24 }
25 }
26}
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_FieldOfViewSettings Attribute