SOLVED: For those who have the same problem, make sure that the "MyMutator.u" file that "KFEditor.exe make" generates is located in "C:\Users\<Your Windows Account>\Documents\My Games\KillingFloor2\KFGame\Unpublished\BrewedPC\Script". Mine was located in "C:\Users\Shepard\Documents\My Games\KillingFloor2\KFGame\Unpublished\Unpublished\Unpublished\BrewedPC\Script" for an unknown reason.
Hello,
I'm currently trying to make a very basic mutator (say "Hello World" 1000 times). I have followed everything written here but I can't test it, here's the only things I've got in my log when I try to test it:
Here is the mutator's code:
My mutator is placed in: "C:\Users\Shepard\Documents\My Games\KFGame\Src\HelloWorldMut\Classes\HelloWorldMut.uc"
My "KFEditor.ini":
"KFEditor.exe make" returns no error, the mutator compiles fine. I'm running the game with the "-useunpublished" parameter and I'm using this command to test: "open KF-BurningParis?Mutator=HelloWorldMut.HelloWorldMut"
Hello,
I'm currently trying to make a very basic mutator (say "Hello World" 1000 times). I have followed everything written here but I can't test it, here's the only things I've got in my log when I try to test it:
Code:
[0426.49] ScriptLog: Mutators HelloWorldMut.HelloWorldMut
[0426.49] Warning: Warning, Failed to load 'Class HelloWorldMut.HelloWorldMut': Failed to find object 'Class HelloWorldMut.HelloWorldMut'
Here is the mutator's code:
Code:
class HelloWorldMut extends Mutator;
var int counter;
function PostBeginPlay()
{
Super.PostBeginPlay();
if (WorldInfo.Game.BaseMutator == None)
WorldInfo.Game.BaseMutator = Self;
else
WorldInfo.Game.BaseMutator.AddMutator(Self);
counter = 0;
SetTimer(0.1, true, 'HelloWorldTimer');
}
function AddMutator(Mutator M)
{
if (M != Self)
{
if (M.Class == Class)
M.Destroy();
else
Super.AddMutator(M);
}
}
function HelloWorldTimer()
{
local int i;
for (i = 0; i < 999; i++)
`log("HelloWorldMut - Hello World for the "$(i + 1)$" time!");
ClearTimer('HelloWorldTimer');
}
defaultproperties
{
}
My mutator is placed in: "C:\Users\Shepard\Documents\My Games\KFGame\Src\HelloWorldMut\Classes\HelloWorldMut.uc"
My "KFEditor.ini":
Code:
[ModPackages]
ModPackagesInPath=..\..\KFGame\Src
ModOutputDir=..\..\KFGame\Unpublished\CookedPC\Script
ModPackages=HelloWorldMut
"KFEditor.exe make" returns no error, the mutator compiles fine. I'm running the game with the "-useunpublished" parameter and I'm using this command to test: "open KF-BurningParis?Mutator=HelloWorldMut.HelloWorldMut"
Last edited: