Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_VehicleClutchCondition.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
5 {
6  [Attribute(defvalue: "0.05", uiwidget: UIWidgets.Auto, desc: "Minimum clutch to pass this conditon")]
7  protected float m_fMinimumClutch;
8 
9  //------------------------------------------------------------------------------------------------
12  override bool IsAvailable(SCR_AvailableActionsConditionData data)
13  {
14  if (!data)
15  return false;
16 
18  {
19  CarControllerComponent controller = CarControllerComponent.Cast(data.GetCurrentVehicleController());
20  if (!controller)
21  return false;
22 
23  VehicleWheeledSimulation simulation = VehicleWheeledSimulation.Cast(controller.GetSimulation());
24  if (!simulation)
25  return false;
26 
27  bool result = simulation.GetClutch() >= m_fMinimumClutch;
28 
29  return GetReturnResult(result);
30  }
31  else
32  {
33  CarControllerComponent_SA controller = CarControllerComponent_SA.Cast(data.GetCurrentVehicleController());
34  if (!controller)
35  return false;
36 
37  VehicleWheeledSimulation_SA simulation = VehicleWheeledSimulation_SA.Cast(controller.GetSimulation());
38  if (!simulation)
39  return false;
40 
41  bool result = simulation.GetClutch() >= m_fMinimumClutch;
42 
43  return GetReturnResult(result);
44  }
45 
46  }
47 };
SCR_AvailableActionsConditionData
Definition: SCR_AvailableActionsConditionData.c:5
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_VehicleClutchCondition
Returns true if vehicle's clutch is at least at specified threshold.
Definition: SCR_VehicleClutchCondition.c:4
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_AvailableActionCondition
A single available action condition representation.
Definition: SCR_AvailableActionsCondition.c:3
GetIsClientAuthority
override bool GetIsClientAuthority()
Definition: game.c:268
Attribute
typedef Attribute
Post-process effect of scripted camera.
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468