Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionToggleEngine.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Target entity to turn on/off the engine (Optional if action is attached on Slot that spawns target entity)")]
5 ref SCR_ScenarioFrameworkGet m_Getter;
6
7 [Attribute(defvalue: "1", desc: "If true, engine will be turned on. Otherwise it will turn it off.")]
8 bool m_bTurnedOn;
9
10 //------------------------------------------------------------------------------------------------
11 override void OnActivate(IEntity object)
12 {
13 if (!CanActivate())
14 return;
15
16 IEntity entity;
17 if (!ValidateInputEntity(object, m_Getter, entity))
18 return;
19
21 if (!vehicleSimulation)
22 {
23 if (object)
24 Print(string.Format("ScenarioFramework Action: Vehicle Wheeled Simulation Component not found for Action %1 attached on %2.", this, object.GetName()), LogLevel.ERROR);
25 else
26 Print(string.Format("ScenarioFramework Action: Vehicle Wheeled Simulation Component not found for Action %1.", this), LogLevel.ERROR);
27
28 return;
29 }
30
31 if (m_bTurnedOn)
32 vehicleSimulation.EngineStart();
33 else
34 vehicleSimulation.EngineStop();
35 }
36}
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 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