Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkGetTopParentEntity.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Entity to get the top parent from")]
5 ref SCR_ScenarioFrameworkGet m_Getter;
6
7 //------------------------------------------------------------------------------------------------
9 {
10 if (!m_Getter)
11 {
12 PrintFormat("ScenarioFramework Getter: Getter not provided for %1.", this, level: LogLevel.ERROR);
13 return null;
14 }
15
16 SCR_ScenarioFrameworkParam<IEntity> entityWrapper = SCR_ScenarioFrameworkParam<IEntity>.Cast(m_Getter.Get());
17 if (!entityWrapper)
18 {
19 PrintFormat("ScenarioFramework Getter: Issue with Getter detected for Getter %1.", this, level: LogLevel.ERROR);
20 return null;
21 }
22
23 IEntity entity = entityWrapper.GetValue();
24 if (!entity)
25 {
26 PrintFormat("ScenarioFramework Getter: Issue with Getter detected for Getter %1. Entity not found.", this, level: LogLevel.ERROR);
27 return null;
28 }
29
30 IEntity rootOwner = entity.GetRootParent();
31 if (!rootOwner)
32 {
33 PrintFormat("ScenarioFramework Getter: Issue with Getter detected for Getter %1. Top Parent Entity not found.", this, level: LogLevel.ERROR);
34 return null;
35 }
36
37 return new SCR_ScenarioFrameworkParam<IEntity>(rootOwner);
38 }
39}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external IEntity GetRootParent()
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