Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 |
/** * * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. */ class UTHeroBomb extends Actor; /** Controller for the dead hero that spawned this hero bomb */ var Controller InstigatorController; /** Number of pulses before a hero's corpse explodes */ var int MaxCountdownPulses; /** Number of countdown pulses since hero's death */ var int CountdownPulses; /** Pulsing sound to play during hero death countdown */ var SoundCue CountdownPulseSound; /** Effect for countdown pulsing */ var class<UTReplicatedEmitter> CountdownPulseEffect; simulated function PostBeginPlay() { Super.PostBeginPlay(); SetTimer(1.0, false, 'ExplodeCountdown'); } /** Sets the warning emitter class based on team */ simulated function SetTeamIndex(int TeamIndex) { if ( TeamIndex == 0 ) { CountdownPulseEffect = class'UTEmit_HeroBombWarning_Red'; } else if ( TeamIndex == 1 ) { CountdownPulseEffect = class'UTEmit_HeroBombWarning_Blue'; } } /** Timer function to be called at each pulse during the hero explosion countdown */ simulated function ExplodeCountdown() { ++CountdownPulses; if (CountdownPulses <= MaxCountdownPulses) { PlaySound(CountdownPulseSound); Spawn(CountdownPulseEffect); SetTimer(1.0, false, 'ExplodeCountdown'); } else { Explode(); } } reliable server function Explode() { local UTProj_HeroRedeemer Proj; Proj = Spawn(class'UTProj_HeroRedeemer', InstigatorController,, Location); Proj.InstigatorController = InstigatorController; Proj.Explode(Location, vect(0,0,1)); CountdownPulses = 0; Destroy(); } defaultproperties { MaxCountdownPulses=3 CountdownPulseSound=SoundCue'A_Titan_Extras.Powerups.A_Powerup_Invulnerability_WarningCue' CountdownPulseEffect=Class'UTGame.UTEmit_HeroBombWarning' bAlwaysRelevant=True CollisionType=COLLIDE_CustomDefault Name="Default__UTHeroBomb" ObjectArchetype=Actor'Engine.Default__Actor' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |