Botpack
Class ChallengeIntro

source: e:\games\UnrealTournament\Botpack\Classes\ChallengeIntro.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.GameInfo
            |
            +--Botpack.TournamentGameInfo
               |
               +--Botpack.DeathMatchPlus
                  |
                  +--Botpack.ChallengeIntro
Direct Known Subclasses:None

class ChallengeIntro
extends Botpack.DeathMatchPlus

//============================================================================= // ChallengeIntro. //=============================================================================

Function Summary
 void PostBeginPlay()
 void Timer()



Source Code


00001	//=============================================================================
00002	// ChallengeIntro.
00003	//=============================================================================
00004	class ChallengeIntro extends DeathMatchPlus;
00005	
00006	function PostBeginPlay()
00007	{
00008		Super.PostBeginPlay();
00009	
00010		MaxPlayers = 1;
00011		RemainingBots = 5;
00012		Difficulty = 1;
00013		TimeLimit = 0;
00014		FragLimit = 0;
00015		bRequireReady = false;
00016	}
00017	
00018	event playerpawn Login
00019	(
00020		string Portal,
00021		string Options,
00022		out string Error,
00023		class<playerpawn> SpawnClass
00024	)
00025	{
00026		local playerpawn NewPlayer;
00027	
00028		SpawnClass = class'CHSpectator';
00029		NewPlayer = Super.Login(Portal, Options, Error, SpawnClass);
00030		return NewPlayer;
00031	}
00032	
00033	function Timer()
00034	{
00035		local Pawn P;
00036	
00037		Super.Timer();
00038	
00039		for ( P = Level.PawnList; P!=None; P=P.NextPawn )
00040			if ( P.IsA('CHSpectator') && (PlayerPawn(P).ViewTarget == None) )
00041			{
00042				PlayerPawn(P).ViewClass(class'Pawn');
00043				Pawn(PlayerPawn(P).ViewTarget).skill = 2;
00044				if ( PlayerPawn(P).ViewTarget.IsA('Bot') )
00045					Bot(PlayerPawn(P).ViewTarget).ReSetSkill();
00046			}
00047	}
00048	
00049	defaultproperties
00050	{
00051	     HUDType=Class'Botpack.CHSpectatorHUD'
00052	}

End Source Code