5 static const string SHOCK_SOUND =
"defibrillator_shock_SoundSet";
31 string cfg_path =
"CfgVehicles " +
GetType() +
" ";
32 return g_Game.ConfigGetFloat (cfg_path +
"defibChargeTime");
37 string cfg_path =
"CfgVehicles " +
GetType() +
" ";
38 return g_Game.ConfigGetFloat (cfg_path +
"defibEnergyNeededPerCharge");
43 if ( !
g_Game.IsDedicatedServer() )
47 GetCompEM().SetEnergyUsage(energy_needed);
60 GetCompEM().SwitchOff();
61 GetCompEM().ResetEnergyUsage();
71 if ( GetCompEM().IsWorking() )
79 GetCompEM().ResetEnergyUsage();
136 victim.SetPulseType(!victim.GetPulseType());
137 victim.SetHealth(
"",
"Shock",0);
139 GetCompEM().SwitchOff();
eBleedingSourceType GetType()
void AddAction(typename actionName)
Wrapper class for managing sound through SEffectManager.
float GetEnergyNeededToCharge()
override void OnWorkStart()
void DischargeClient(PlayerBase victim)
static const string CHARGING_SOUND
override void SetActions()
void DischargeServer(PlayerBase victim)
EffectSound m_ChargingSound
EffectSound m_ChargedAlarm
ref Timer m_ChargingTimer
override void OnWorkStop()
static const string CHARGED_AND_READY_SOUND
float GetTimeNeededToCharge()
static const string SHOCK_SOUND
static float m_ChargeTime
static float m_EnergyNeededToCharge
static EffectSound PlaySoundOnObject(string sound_set, Object parent_object, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Manager class for managing Effect (EffectParticle, EffectSound)