Legacy:Power Core Volume Control Mutator/PowerCoreDestroyed
From Unreal Wiki, The Unreal Engine Documentation Site
The complete PowerCore.PowerCoreDestroyed() function for reference purposes.
<uscript> simulated function PowerCoreDestroyed() {
local PlayerController PC; AmbientSound = None; Health = 0;
if (Level.NetMode != NM_DedicatedServer) { PC = Level.GetLocalPlayerController(); if (PC != None) PC.ClientPlaySound(DestroyedSound, False, 2.0); else PlaySound(DestroyedSound, SLOT_Misc, 5.0);
ExplosionEffect = spawn(class'ONSPowerCoreBreachEffect', self); Skins.length = 0; }
if (Role == ROLE_Authority) { NetUpdateTime = Level.TimeSeconds - 1; Scorers.length = 0; UpdateCloseActors(); OnCoreDestroyed(DefenderTeamIndex); NotifyUpdateLinks(); DefenderTeamIndex = 2; GotoState('DestroyedCore'); }
UpdateLinkState(Self);
} </uscript>