Botpack
Class FemaleBotPlus

source: e:\games\UnrealTournament\Botpack\Classes\FemaleBotPlus.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Pawn
         |
         +--Botpack.Bot
            |
            +--Botpack.HumanBotPlus
               |
               +--Botpack.FemaleBotPlus
Direct Known Subclasses:TFemale1Bot, TFemale2Bot

class FemaleBotPlus
extends Botpack.HumanBotPlus

//============================================================================= // FemaleBotPlus. //=============================================================================

Function Summary
 void PlayChallenge()
 void PlayDecap()
 void PlayDying(name DamageType, vector HitLoc)
 void PlayRightHit(float tweentime)
 void PlayVictoryDance()



Source Code


00001	//=============================================================================
00002	// FemaleBotPlus.
00003	//=============================================================================
00004	class FemaleBotPlus extends HumanBotPlus
00005		abstract;
00006	
00007	function PlayRightHit(float tweentime)
00008	{
00009		if ( AnimSequence == 'RightHit' )
00010			TweenAnim('GutHit', tweentime);
00011		else
00012			TweenAnim('RightHit', tweentime);
00013	}	
00014	
00015	function PlayChallenge()
00016	{
00017		TweenToWaiting(0.17);
00018	}
00019	
00020	function PlayVictoryDance()
00021	{
00022		local float decision;
00023	
00024		decision = FRand();
00025	
00026		if ( decision < 0.25 )
00027			PlayAnim('Victory1',0.7, 0.2);
00028		else if ( decision < 0.5 )
00029			PlayAnim('Thrust',0.7, 0.2);
00030		else if ( decision < 0.75 )
00031			PlayAnim('Taunt1',0.7, 0.2);
00032		else
00033			TweenAnim('Taunt1', 0.2);
00034	}
00035	
00036	function PlayDying(name DamageType, vector HitLoc)
00037	{
00038		local carcass carc;
00039	
00040		BaseEyeHeight = Default.BaseEyeHeight;
00041		PlayDyingSound();
00042				
00043		if ( DamageType == 'Suicided' )
00044		{
00045			PlayAnim('Dead3',, 0.1);
00046			return;
00047		}
00048	
00049		// check for head hit
00050		if ( (DamageType == 'Decapitated') && !Level.Game.bVeryLowGore )
00051		{
00052			PlayDecap();
00053			return;
00054		}
00055	
00056		if ( FRand() < 0.15 )
00057		{
00058			PlayAnim('Dead7',,0.1);
00059			return;
00060		}
00061	
00062		// check for big hit
00063		if ( (Velocity.Z > 250) && (FRand() < 0.75) )
00064		{
00065			if ( (HitLoc.Z < Location.Z) && !Level.Game.bVeryLowGore && (FRand() < 0.6) )
00066			{
00067				PlayAnim('Dead5',,0.05);
00068				if ( Level.NetMode != NM_Client )
00069				{
00070					carc = Spawn(class 'UT_FemaleFoot',,, Location - CollisionHeight * vect(0,0,0.5));
00071					if (carc != None)
00072					{
00073						carc.Initfor(self);
00074						carc.Velocity = Velocity + VSize(Velocity) * VRand();
00075						carc.Velocity.Z = FMax(carc.Velocity.Z, Velocity.Z);
00076					}
00077				}
00078			}
00079			else
00080				PlayAnim('Dead2',, 0.1);
00081			return;
00082		}
00083	
00084		// check for repeater death
00085		if ( (Health > -10) && ((DamageType == 'shot') || (DamageType == 'zapped')) )
00086		{
00087			PlayAnim('Dead9',, 0.1);
00088			return;
00089		}
00090			
00091		if ( (HitLoc.Z - Location.Z > 0.7 * CollisionHeight) && !Level.Game.bVeryLowGore )
00092		{
00093			if ( FRand() < 0.5 )
00094				PlayDecap();
00095			else
00096				PlayAnim('Dead3',, 0.1);
00097			return;
00098		}
00099		
00100		//then hit in front or back	
00101		if ( FRand() < 0.5 ) 
00102			PlayAnim('Dead4',, 0.1);
00103		else
00104			PlayAnim('Dead1',, 0.1);
00105	}
00106	
00107	function PlayDecap()
00108	{
00109		local carcass carc;
00110	
00111		PlayAnim('Dead6',, 0.1);
00112		if ( Level.NetMode != NM_Client )
00113		{
00114			carc = Spawn(class 'UT_HeadFemale',,, Location + CollisionHeight * vect(0,0,0.8), Rotation + rot(3000,0,16384) );
00115			if (carc != None)
00116			{
00117				carc.Initfor(self);
00118				carc.Velocity = Velocity + VSize(Velocity) * VRand();
00119				carc.Velocity.Z = FMax(carc.Velocity.Z, Velocity.Z);
00120			}
00121		}
00122	}
00123		
00124	
00125	defaultproperties
00126	{
00127	     CarcassType=Class'Botpack.TFemale1Carcass'
00128	     drown=Sound'UnrealShare.Female.mdrown2fem'
00129	     breathagain=Sound'Botpack.FemaleSounds.(All).hgasp3'
00130	     HitSound3=Sound'Botpack.FemaleSounds.(All).linjur4'
00131	     HitSound4=Sound'Botpack.FemaleSounds.(All).hinjur4'
00132	     Deaths(0)=Sound'Botpack.FemaleSounds.(All).death1d'
00133	     Deaths(1)=Sound'Botpack.FemaleSounds.(All).death2a'
00134	     Deaths(2)=Sound'Botpack.FemaleSounds.(All).death3c'
00135	     Deaths(3)=Sound'Botpack.FemaleSounds.(All).decap01'
00136	     Deaths(4)=Sound'Botpack.FemaleSounds.(All).death41'
00137	     Deaths(5)=Sound'Botpack.FemaleSounds.(All).death42'
00138	     UWHit1=Sound'Botpack.FemaleSounds.(All).UWhit01'
00139	     UWHit2=Sound'UnrealShare.Male.MUWHit2'
00140	     LandGrunt=Sound'Botpack.FemaleSounds.(All).lland1'
00141	     JumpSound=Sound'Botpack.FemaleSounds.(All).Fjump1'
00142	     StatusDoll=Texture'Botpack.Icons.Woman'
00143	     StatusBelt=Texture'Botpack.Icons.WomanBelt'
00144	     VoicePackMetaClass="BotPack.VoiceFemale"
00145	     bIsFemale=True
00146	     HitSound1=Sound'Botpack.FemaleSounds.(All).linjur2'
00147	     HitSound2=Sound'Botpack.FemaleSounds.(All).linjur3'
00148	     Die=Sound'Botpack.FemaleSounds.(All).death1d'
00149	}

End Source Code