Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

GameFramework.PlayerCollectorGame


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
/**
 * Copyright 1998-2011 Epic Games, Inc. All Rights Reserved.
 */
class PlayerCollectorGame extends GameInfo;

/** The number of clients that are expected to join before we seamless travel */
var int NumberOfClientsToWaitFor;

/** URL of the actual game to travel to when all clients join */
var string URLToLoad;

event PlayerController Login(string Portal, string Options, const UniqueNetID UniqueID, out string ErrorMessage)
{
	local PlayerController PC;

	// perform default behavior to maket he controller
	PC = super.Login(Portal, Options, UniqueID, ErrorMessage);

	// if the PC failed to login, don't use it
	if (PC == none)
	{
		return none;
	}

	// handle the server starting up
	if (NumberOfClientsToWaitFor == 0)
	{
		// default to waiting on one client
		NumberOfClientsToWaitFor = GetIntOption(Options, "NumClients", 1); 
		URLToLoad = ParseOption(Options, "SubMap");
		URLToLoad = URLToLoad $ "?game=" $ ParseOption(Options, "SubGame");
	}
	else
	{
		NumberOfClientsToWaitFor--;
	}

	// when everyone has joined, seamless travel to the actual map
	if (NumberOfClientsToWaitFor == 0)
	{
`log("SEAMLESS TRAVELING TO " $ URLToLoad);
		WorldInfo.SeamlessTravel(URLToLoad, true, );
	}

	return PC;
}

event GetSeamlessTravelActorList(bool bToEntry, out array<Actor> ActorList)
{
	// add nothing we just want to start from scratch in this case
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: to 6-1-2011 07:11:20.000 - Creation time: ti 22-3-2011 19:57:10.114 - Created with UnCodeX