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

OnslaughtSpecialsLiteV2.ONSWithTranslocator


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
/******************************************************************************
Forcibly enables the translocator in this map. Can be disabled for specific
link setups via link setup supplements.

Creation date: 2010-08-22 10:30
Last change: $Id$
Copyright © 2010, Wormbo
Website: http://www.koehler-homepage.de/Wormbo/
Feel free to reuse this code. Send me a note if you found it helpful or want
to report bugs/provide improvements.
Please ask for permission first, if you intend to make money off reused code.
******************************************************************************/

class ONSWithTranslocator extends Info placeable;


/**
Hooks into player spawning by capturing PlayerStart events.
*/
function BeginPlay()
{
	local PlayerStart PS;
	local array<name> EventNames;
	local int i;

	Tag = ''; // ensure not triggered directly

	foreach AllActors(class'PlayerStart', PS) {
		// ensure event is set to something
		if (PS.Event == '')
			PS.Event = Class.Name;

		// find already captured event names
		i = -1;
		do {} until (++i == EventNames.Length || EventNames[i] == PS.Event);

		if (i == EventNames.Length) {
			// event not captured yet
			EventNames[EventNames.Length] = PS.Event;
			Spawn(class'ONSSpecialEventForwarder', Self, PS.Event);
		}
	}
}


function Trigger(Actor PlayerStart, Pawn SpawnedPlayer)
{
	if (SpawnedPlayer == None)
		return;

	//log("Adding Translocator to"@SpawnedPlayer.PlayerReplicationInfo.PlayerName, Class.Name);
	SpawnedPlayer.CreateInventory("XWeapons.TransLauncher");
}


//=============================================================================
// Default values
//=============================================================================

defaultproperties
{
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 24.9.2013 09:44:00.000 - Creation time: Do 14.8.2014 09:58:47.924 - Created with UnCodeX