PDA

View Full Version : Why doesnt this work ?



woooo
11-25-2007, 06:30 PM
// Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
class UTMutator_YesTranslocator extends UTMutator;

function InitMutator(string Options, out string ErrorMessage)
{
if ( UTGame(WorldInfo.Game) != None )
{
UTGame(WorldInfo.Game).bAllowTranslocator = true;
}
Super.InitMutator(Options, ErrorMessage);
}

defaultproperties
{
GroupNames(0)="TRANSLOC"
// Begin Object Class=SpriteComponent Name=Sprite ObjName=Sprite //Archetype=SpriteComponent'UTGame.Default__UTMutato r:Sprite'
// ObjectArchetype=SpriteComponent'UTGame.Default__UT Mutator:Sprite'
End Object
Components(0)=Sprite
Name="Default__UTMutator_YesTranslocator"
ObjectArchetype=UTMutator'UTGame.Default__UTMutato r'
}



Ive compiled it no problems there, b ut when I go in game I dont have a translocator, ive been trying many diffferent ways and I just cant clock it, help please ?

Or even how to refer into the UTGame.UTDeathmatch class

kisk
11-25-2007, 08:33 PM
you have to set the translocator class...



function InitMutator(string Options, out string ErrorMessage)
{
if ( UTGame(WorldInfo.Game) != None )
{
UTGame(WorldInfo.Game).TranslocatorClass = class'YourClass';
UTGame(WorldInfo.Game).bAllowTranslocator = true;
}
Super.InitMutator(Options, ErrorMessage);
}


I already have an example of some TL code in the Full Releases section (TranslocatorPlus)

woooo
11-25-2007, 09:16 PM
ah I have done that before, I know why it didnt work !! I was using the wrong TL class -_- silly me bah