Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TurnOnAction.c
Go to the documentation of this file.
2 {
3  //---------------------------------------------------------
4  override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
5  {
6  RadioBroadcastComponent broadcastComponent = GetRadioBCComponent();
7  if (broadcastComponent)
8  {
9  if(broadcastComponent.GetState())
10  broadcastComponent.EnableRadio(false);
11  else
12  broadcastComponent.EnableRadio(true);
13  }
14  }
15 
16  //------------------------------------------------------------------------------------------------
17  override bool CanBePerformedScript(IEntity user)
18  {
19  RadioBroadcastComponent broadcastComponent = GetRadioBCComponent();
20  if (broadcastComponent)
21  return true;
22 
23  return false;
24  }
25 
26  //------------------------------------------------------------------------------------------------
27  override bool CanBroadcastScript()
28  {
29  return false;
30  }
31 
32  //------------------------------------------------------------------------------------------------
33  override bool GetActionNameScript(out string outName)
34  {
35  RadioBroadcastComponent broadcastComponent = GetRadioBCComponent();
36 
37  if (broadcastComponent.GetState())
38  outName = "#AR-UserAction_TurnOff";
39  else
40  outName = "#AR-UserAction_TurnOn";
41 
42  return true;
43  }
44 };
SCR_TurnOnAction
Definition: SCR_TurnOnAction.c:1
TurnOnUserAction
Definition: TurnOnUserAction.c:12