Quick feedback:
- It needs proper readme with an installation section
- GiveTranslocator can be done with the modifcation of a specific GameType property (like you did with the AllowHoverboard mutator)
Code:
class AllowTranslocator extends UTMutator;
function InitMutator(string Options, out string ErrorMessage)
{
if ( UTGame(WorldInfo.Game) != None )
{
UTGame(WorldInfo.Game).bAllowTranslocator = True;
UTGame(WorldInfo.Game).TranslocatorClass = class'UTWeap_Translocator_Content';
}
Super.InitMutator(Options, ErrorMessage);
}
- The threads name (and the gametype's name) is misleading as it implies that someone is able to translocate (with) the flag which is not the case.
- The ini files needs to have correct values.
GameSettingsClass=UTGameSettingsCTF
GameSearchClass=UTGameSearchCTF
In this case, the serverbrowser will list this game as CTF. The settings should be written to the CTF stats as well.
-----------------
The AllowTranslocator is useless. The gametype inherits the wrong class. It needs to be the content class (to work correctly).
Code:
class UTTLCTF extends UTCTFGame_Content;
defaultproperties
{
bStartWithLockerWeaps=True
Acronym="UTTLCTF"
MapPrefixes.Empty
MapPrefixes.Add("VCTF")
MapPrefixes.Add("CTF")
}
The Translocator should be available in this gametype.
---------------

Originally Posted by
TKBS
[B][U][COLOR=#FF0000]
** please can someone teach me to code "give inventory to players" without replacing them....
You can check the following thread.
http://forums.epicgames.com/threads/...1#post27732009
Basically, it can be done via the ModifyPlayer function and giving the Pawn an inventory item (which includes weapons, powerups, pickups, ...).
Code:
class AddTranslocator extends UTMutator
config(MyMutator);
var config string WeaponString;
function ModifyPlayer(Pawn P)
{
local class< Inventory > weapclass;
PlayerPawn = UTPawn(P);
if ( PlayerPawn == None )
{
return;
}
weapclass = class<Inventory>(DynamicLoadObject(WeaponString, class'Class'));;
// Ensure we don't give duplicate items
if (PlayerPawn.FindInventoryType( weapclass ) == None)
{
PlayerPawn.CreateInventory(weapclass);
}
Super.ModifyPlayer(P);
}
defaultproperties
{
WeaponString="UTGameContent.UTWeap_Translocator_Content"
}
----------------
As said in the quoted thread (VCTF to CTF converson), you can add a vehicle removement. Something like this.
Code:
class VCTFCTF extends UTCTFGame_Content;
var bool bRemoveVehicles;
// Parse options for this game...
event InitGame( string Options, out string ErrorMessage )
{
local string MapName;
super.InitGame(Options, ErrorMessage);
MapName = WorldInfo.GetMapName(true);
if ( Left(MapName, 4) ~= "VCTF" )
{
bRemoveVehicles = true;
}
}
function bool CheckRelevance(Actor Other)
{
if (bRemoveVehicles && UTVehicleFactory(Other) !=none)
{
UTVehicleFactory(Other).VehicleClassPath = "";
UTVehicleFactory(Other).VehicleClass = none;
return false;
}
return super.CheckRelevance(Other);
}
defaultproperties
{
bStartWithLockerWeaps=True
Acronym="VCTFCTF"
MapPrefixes.Empty
MapPrefixes.Add("VCTF")
MapPrefixes.Add("CTF")
}
This mutator works fine. Every vehicle is removed from any VCTF map (kismet ActorFactory or similar is not implemented).
------------------------
Your intention of creating a combined maplist for CTF can be done with just a INI file. I did not test if it works for clients machines.
Code:
[UTCombinedVCTFCTF UTUIDataProvider_GameModeInfo]
FriendlyName=Combined VCTF & CTF
Description=
GameMode=UTGameContent.UTCTFGame_Content
GameSettingsClass=UTGameSettingsCTF
GameSearchClass=UTGameSearchCTF
PreviewImageMarkup=<Images:UI_FrontEnd_Art.GameTypes.CaptureTheFlag>
DefaultMap=CTF-Strident
Prefixes=CTF|VCTF
OptionSet=CTF|VCTF
IconImage=UI_HUD.HUD.UI_HUD_BaseD
IconU=230
IconV=76
IconUL=104
IconVL=113
---------------------
Hope all these tips, advices and code snippets are helpful.
Bookmarks