Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_VehicleBrakeCondition.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
5 {
6  [Attribute(defvalue: "0.05", uiwidget: UIWidgets.Auto, desc: "Minimum braking to pass this conditon")]
7  protected float m_fMinimumBrake;
8  //------------------------------------------------------------------------------------------------
11  override bool IsAvailable(SCR_AvailableActionsConditionData data)
12  {
13  if (!data)
14  return false;
15 
17  {
18  CarControllerComponent controller = CarControllerComponent.Cast(data.GetCurrentVehicleController());
19  if (!controller)
20  return false;
21 
22  VehicleWheeledSimulation simulation = VehicleWheeledSimulation.Cast(controller.GetSimulation());
23  if (!simulation)
24  return false;
25 
26  bool result = simulation.GetBrake() >= m_fMinimumBrake;
27 
28  return GetReturnResult(result);
29  }
30  else
31  {
32  CarControllerComponent_SA controller = CarControllerComponent_SA.Cast(data.GetCurrentVehicleController());
33  if (!controller)
34  return false;
35 
36  VehicleWheeledSimulation_SA simulation = VehicleWheeledSimulation_SA.Cast(controller.GetSimulation());
37  if (!simulation)
38  return false;
39 
40  bool result = simulation.GetBrake() >= m_fMinimumBrake;
41 
42  return GetReturnResult(result);
43  }
44  }
45 };
SCR_AvailableActionsConditionData
Definition: SCR_AvailableActionsConditionData.c:5
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
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
SCR_VehicleBrakeCondition
Returns true if vehicle's brakes are at least at specified threshold.
Definition: SCR_VehicleBrakeCondition.c:4
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