Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionMoveIntoCompartment.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Entity that will be moved into target entity.")]
5 ref SCR_ScenarioFrameworkGet m_Getter;
6
7 [Attribute(desc: "Target entity.")]
8 ref SCR_ScenarioFrameworkGet m_GetterTargetEntity;
9
10 [Attribute(defvalue: "0", desc: "Index of the target entity's compartment.", params: "0 inf")]
11 int m_iCompartmentIndex;
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
23 IEntity targetEntity;
24 if (!ValidateInputEntity(object, m_GetterTargetEntity, targetEntity))
25 return;
26
28 if (!compartmentManager)
29 return;
30
31 array<BaseCompartmentSlot> compartments = {};
32 compartmentManager.GetCompartments(compartments);
33
34 if (m_iCompartmentIndex >= compartments.Count())
35 {
36 Print(string.Format("ScenarioFramework Action: Number of available compartments for entity %2 Action %1 is lower than requested index. Max number is %3. Action won't do anything.", this, targetEntity.GetName(), compartments.Count()), LogLevel.ERROR);
37 return;
38 }
39
41 if (!compartmentAccess)
42 return;
43
44 compartmentAccess.GetInVehicle(targetEntity, compartments[m_iCompartmentIndex], true, -1, ECloseDoorAfterActions.INVALID, true);
45 }
46}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
proto external string GetName()
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute
ECloseDoorAfterActions