UE3 - UDK Creating a Mutator

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

cH40z

New Member
Feb 1, 2010
1
0
0
hi everybody,

i'm planning to write a game with the unreal engine 3.
the last days, i read some tutorials and i must admit that i'm a little bit confused.

i choose visual studio 2008 professional with the nFringe plugin as my ide.
first i started to implement my own gametype called GDGame.
i created the following folderstructure:

UDK\Development\Src\GDGame\Classes\GDGame.uc
UDK\Development\Src\GDGame\Classes\GDGCamera.uc
UDK\Development\Src\GDGame\Classes\GDGPlayerController.uc
UDK\Development\Src\GDGame\Classes\GDGPlayerInput.uc
UDK\Development\Src\GDGame\Classes\GDGPown.uc

i added my gametype in the UDK\UTGame\Config\DefaultEngine.ini

Code:
[UnrealEd.EditorEngine]
ModEditPackages=GDGame

when i start the game with the following parameters, i can play my new gametype.
Code:
UDK.exe testmaps001?game=GDGame.GDGame -vadebug -useunpublished
when i don't define it, it won't be shown in the menu as gametype.

i also created a mutator with add->new->UT3 Mutator:
UDK\Development\Src\ThirdPersonMutator\Classes\ThirdPersonMutator.ini
UDK\Development\Src\ThirdPersonMutator\Classes\ThirdPersonMutator.int
UDK\Development\Src\ThirdPersonMutator\Classes}ThirdPersonMutator.uc

i added my mutator in the UDK\UTGame\Config\DefaultEditor.ini
Code:
[ModPackages]
ModPackages=ThirdPersonMutator

after all i use the make command to recompile and the frontend to cook.

when i start the game with the following parameters i get no errors.

Code:
UDK.exe testmaps001?Mutator=ThirdPersonMutator.ThirdPersonMutator -vadebug -useunpublished
i think the mutator works because of no errors. (the mutator doesn't do anything at all!!!)

i modified my mutator class this way:

Code:
class ThirdPersonMutator extends UTMutator;

function InitMutator( string Options, out string ErrorMessage )
{
		`log("mut init");
	super.InitMutator( options, ErrorMessage );

}

function bool CheckReplacement( Actor Other )
{
	`log("check rep");
	// return true to keep this actor
	return true;
}

DefaultProperties
{
}

but the console only say:
Code:
ScriptLog: Mutators ThirdPersonMutator.ThirdPersonMutator
ScriptLog: Mutator init

when i start the game without parameters the mutator still doesn't appear in the mutators menu!


how to make my gametype/mutator vissible in the menu of the game?

why is the `log(); command in the InitMutator method ignored? it seems, that this function isn't called!

please help me. i'am new in unrealscript and the tutorials i found are really outdated i think.

thanks
 
Last edited: