Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionChangeUserActionVisibility.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Target entity that has the UserAction on it (Optional if action is attached on Slot that spawns target entity)")]
5 ref SCR_ScenarioFrameworkGet m_Getter;
6
7 [Attribute(desc: "ID corresponding to the action attached on ActionsManagerComponent on target entity")]
8 int m_iActionID;
9
10 [Attribute(defvalue: "1", desc: "If checked, user action will be visible, otherwise it will be hidden.")]
11 bool m_bVisible;
12
13 //------------------------------------------------------------------------------------------------
14 override void OnActivate(IEntity object)
15 {
16 if (!CanActivate())
17 return;
18
19 IEntity entity;
20 if (!ValidateInputEntity(object, m_Getter, entity))
21 return;
22
24 if (!actionsManager)
25 return;
26
27 BaseUserAction userAction = actionsManager.FindAction(m_iActionID);
28 if (userAction)
29 userAction.SetActionEnabled_S(m_bVisible);
30 else
31 PrintFormat("ScenarioFramework Action: User Action %1 not found for object %2", this, entity.GetName(), level: LogLevel.ERROR);
32 }
33}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external void SetActionEnabled_S(bool enable)
Action can be enabled/disabled by the server. Disabled actions return false for CanBeShown()....
proto external Managed FindComponent(typename typeName)
proto external string GetName()
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
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