4 const string SELECTION_INTERACT =
"gate_interact";
13 override void CreateConditionComponents()
21 Object targetObject = target.GetObject();
22 if ( targetObject && targetObject.CanUseConstruction() )
24 Fence fence = Fence.Cast( targetObject );
26 if ( fence && fence.CanCloseFence() )
29 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections);
31 for (
int i = 0; i < selections.Count(); i++ )
33 if ( selections[i] == SELECTION_INTERACT )
42 override void OnStartServer(
ActionData action_data )
44 Fence fence = Fence.Cast( action_data.m_Target.GetObject() );
48 override void OnEndServer(
ActionData action_data )
51 m_NoisePar.LoadFromPath(
"CfgVehicles SurvivorBase NoiseActionDefault");
55 if ( action_data.m_Player )
56 noise.AddNoisePos(action_data.m_Player, action_data.m_Target.GetObject().GetPosition(),
m_NoisePar);