Core.Object | +--Engine.Actor | +--Engine.Pawn | +--XIDMaps.USA02HelicoBoss
USA02HelicoHSEmitter
Emit
float
MemTime
USA02HelicoRotorAbove
RotorA
USA02HelicoRotorBack
RotorR
sound
hBeginFightSound
hCrashSound
hVictorySound
void
Notify()
//_____________________________________________________________________________
00001 //----------------------------------------------------------- 00002 // 00003 //----------------------------------------------------------- 00004 class USA02HelicoBoss extends Pawn; 00005 00006 var float MemTime; // to avoid 2 takedamages from same rocket 00007 var USA02HelicoRotorAbove RotorA; 00008 var USA02HelicoRotorBack RotorR; 00009 var USA02HelicoHSEmitter Emit; 00010 00011 var sound hBeginFightSound; 00012 var sound hCrashSound; 00013 var sound hVictorySound; 00014 00015 //_____________________________________________________________________________ 00016 event PostBeginPlay() 00017 { 00018 Super.PostBeginPlay(); 00019 PlaySound(hBeginFightSound); 00020 RotorA = Spawn(class'USA02HelicoRotorAbove', self); 00021 if ( RotorA != none ) 00022 { 00023 RotorA.SetBase(self); 00024 RotorA.SetRelativeLocation(vect(155,0,20)*DrawScale); 00025 RotorA.SetRelativeRotation(rot(0,0,0)); 00026 RotorA.SetDrawScale(DrawScale); 00027 } 00028 RotorR = Spawn(class'USA02HelicoRotorBack', self); 00029 if ( RotorR != none ) 00030 { 00031 RotorR.SetBase(self); 00032 RotorR.SetRelativeLocation(vect(-720,-25,95)*DrawScale); 00033 RotorR.SetRelativeRotation(rot(0,0,0)); 00034 RotorR.SetDrawScale(DrawScale); 00035 } 00036 } 00037 00038 //_____________________________________________________________________________ 00039 event Destroyed() 00040 { 00041 RotorA.Destroy(); 00042 RotorR.Destroy(); 00043 Emit.Destroy(); 00044 } 00045 00046 //_____________________________________________________________________________ 00047 function Notify() 00048 { 00049 //gestion du son en crash 00050 PlaySound(hCrashSound); 00051 } 00052 00053 //_____________________________________________________________________________ 00054 // Special Boss damages, need 3 rockets to blow up. 00055 function TakeDamage( int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, class<DamageType> damageType) 00056 { 00057 if ( (DamageType != class'DTRocketed') || (Level.TimeSeconds <= MemTime+0.3) || (Damage<200) ) 00058 return; 00059 USA02HelicoBossController(Controller).NotifyTakeDamage(); 00060 MemTime = Level.TimeSeconds; 00061 Health -= 1; 00062 DebugLog("\ HelicoBoss -- LOSING ONE LIFE, Damages="$Damage); 00063 if ( Health <= 0 ) 00064 { 00065 PlaySound(hVictorySound); 00066 Controller.GotoState('EndOfMe'); 00067 Emit = Spawn(class'USA02HelicoHSEmitter', none); 00068 Emit.SetBase(self); 00069 Emit.SetRelativeLocation(vect(155,0,20)*DrawScale); 00070 Emit.SetRelativeRotation(rot(0,0,0)); 00071 XIIIBaseHud(XIIIGameInfo(Level.Game).MapInfo.XIIIController.MyHud).AddBossBar( none ); 00072 00073 } 00074 } 00075 00076 /* 00077 //_____________________________________________________________________________ 00078 auto state Initialize 00079 { 00080 } 00081 */ 00082 00083 // hFlightSound=Sound'XIIIsound.Vehicles__USABossHelico.USABossHelico__hBeginFight' 00084 00085 00086 defaultproperties 00087 { 00088 hBeginFightSound=Sound'XIIIsound.Vehicles__USABossHelico.USABossHelico__hBeginFight' 00089 hCrashSound=Sound'XIIIsound.Vehicles__USABossHelico.USABossHelico__hCrash' 00090 hVictorySound=Sound'XIIIsound.Vehicles__USABossHelico.USABossHelico__hVictory' 00091 bCanStrafe=True 00092 bBoss=True 00093 PawnName="Chopper" 00094 Health=3 00095 bProjTarget=False 00096 Physics=PHYS_Flying 00097 DrawType=DT_StaticMesh 00098 StaticMesh=StaticMesh'Meshes_Vehicules.apacheBoss' 00099 DrawScale=1.200000 00100 StabilisationDistance=15000.000000 00101 StabilisationVolume=-25.000000 00102 }