The mod that I'm using(the UT2004RPG mod) and the mutator file has this:
Ok everything is fine there, but when I play using the new gametype that I created, the game rules won't aply, and in the log I receive this error msg:
Maybe I've done something wrong in the gametype XD since in other gametypes it's working just fine =/
here is my new gametype code:
Code:
function PostBeginPlay()
{
local RPGRules G;
local int x;
local Pickup P;
local RPGPlayerDataObject DataObject;
local array<string> PlayerNames;
G = spawn(class'RPGRules');
G.RPGMut = self;
G.PointsPerLevel = PointsPerLevel;
G.LevelDiffExpGainDiv = LevelDiffExpGainDiv;
if ( Level.Game.GameRulesModifiers == None )
Level.Game.GameRulesModifiers = G;
else
Level.Game.GameRulesModifiers.AddGameRules(G);
if (bReset)
{
//load em all up, and delete them one by one
PlayerNames = class'RPGPlayerDataObject'.static.GetPerObjectNames("UT2004RPG",, 1000000);
for (x = 0; x < PlayerNames.length; x++)
{
DataObject = new(None, PlayerNames[x]) class'RPGPlayerDataObject';
DataObject.ClearConfig();
}
bReset = false;
SaveConfig();
}
for (x = 0; x < WeaponModifiers.length; x++)
TotalModifierChance += WeaponModifiers[x].Chance;
spawn(class'RPGArtifactManager');
if (SaveDuringGameInterval > 0.0)
SetTimer(SaveDuringGameInterval, true);
if (StartingLevel < 1)
{
StartingLevel = 1;
SaveConfig();
}
BotSpendAmount = PointsPerLevel * 3;
//HACK - if another mutator played with the weapon pickups in *BeginPlay() (like Random Weapon Swap does)
//we won't get CheckRelevance() calls on those pickups, so find any such pickups here and force it
foreach DynamicActors(class'Pickup', P)
if (P.bScriptInitialized && !P.bGameRelevant && !CheckRelevance(P))
P.Destroy();
Super.PostBeginPlay();
}
Ok everything is fine there, but when I play using the new gametype that I created, the game rules won't aply, and in the log I receive this error msg:
Code:
Warning: RPGRules SWMS-1on1-Desolation.RPGRules (Function Engine.Actor.PreBeginPlay:0043) Accessed None 'BaseMutator'
Warning: MutUT2004RPG SWMS-1on1-Desolation.MutUT2004RPG (Function ut2004rpg.MutUT2004RPG.PostBeginPlay:0015) Accessed None 'G'
Warning: MutUT2004RPG SWMS-1on1-Desolation.MutUT2004RPG (Function ut2004rpg.MutUT2004RPG.PostBeginPlay:001D) Attempt to assign variable through None
Warning: MutUT2004RPG SWMS-1on1-Desolation.MutUT2004RPG (Function ut2004rpg.MutUT2004RPG.PostBeginPlay:0025) Accessed None 'G'
Warning: MutUT2004RPG SWMS-1on1-Desolation.MutUT2004RPG (Function ut2004rpg.MutUT2004RPG.PostBeginPlay:002D) Attempt to assign variable through None
Warning: MutUT2004RPG SWMS-1on1-Desolation.MutUT2004RPG (Function ut2004rpg.MutUT2004RPG.PostBeginPlay:0039) Accessed None 'G'
Warning: MutUT2004RPG SWMS-1on1-Desolation.MutUT2004RPG (Function ut2004rpg.MutUT2004RPG.PostBeginPlay:0041) Attempt to assign variable through None
Warning: RPGArtifactManager SWMS-1on1-Desolation.RPGArtifactManager (Function Engine.Actor.PreBeginPlay:0043) Accessed None 'BaseMutator'
Maybe I've done something wrong in the gametype XD since in other gametypes it's working just fine =/
here is my new gametype code:
Code:
class MSGame extends xTeamGame;
defaultproperties
{
HUDType="UT2004RPG.HudSWTeamDeathMatch"
DMHints(10)="If you are a vampire avoid the sun. If not you can enjoy it."
DMHints(11)="Distroy as many enemies as you can."
DMHints(12)="Try working out with your race as a team, use advanced tatics."
bWeaponStay=False
bAllowVehicles=True
bLiberalVehiclePaths=True
MapListType="UT2004RPG.MapList_Massacre"
MapPrefix="SWMS"
BeaconName="SWMS"
GoalScore=0
TimeLimit=0
MutatorClass="UT2004RPG.MutUT2004RPG"
GameName="Shadows War Massacre"
ScreenShotName="UT2004Thumbnails.TDMShots"
DecoTextName="UT2004RPG.MSGame"
Acronym="SWMS"
}