ENTRY ONE
Hi
I'm working on a sound pack for killing floor and I need some help.
ANY AND ALL INFORMATION WOULD HELP
What I'm trying to do is make a mutator that will replace the player voices with duke nukem.
I have the sound files for the duke quotes but I don't know how to make a mutator.
I want the mutator to work online on my server.
Thanks for reading and please help me out
-------------------------------------------------------------------------------------------------------------------
ENTRY TWO
Ok I've hit my first major speed bump
CODING
I took some code from a mutator that preforms a "check replacement" and edited it to what I thought looked right
(I have no idea what I'm doing here and its probably all wrong)
Anyway this is the error i get when trying to compile my mutator
"Error: D:\Program Files\Steam\games\steamapps\common\killingfloor\DukeVoice\Classes\DukeVoice.uc(30) : Error, Redefinition of 'function CheckReplacement' differs from original in Mutator
Log: Compile aborted due to errors.
Log: Failure - 1 error(s), 0 warning(s)"
Anyone no how to fix it
Take a look at the code below (its probably wrong in many ways)
Mutator code for DukeVoice.uc
-------------------------------------------------------------------------------------------------------------------
class DukeVoice extends Mutator;
// === FUNCTIONS ===
/*
Name: initmutator
Parameters: string, string
Purpose: Called when the mutator is "turned on", any setting up done here
*/
function initMutator(string Options, out string ErrorMessage) {
if(KFGameType(Level.Game) != None) { // Make sure there is a valid game
}
loginternal( "Inited Duke Voice" );
Super.initMutator(Options, ErrorMessage);
}
/*
Name: CheckReplacement
Parameters: Actor
Purpose: Allows you to replace any object in the game with another, awesomes!
*/
function bool CheckReplacement(Actor Other) {
if(Other.IsA('MaleVoiceOne') && !Other.IsA('Duke_voice_v3') ) {
loginternal( "Replaced Voices" );
ReplaceWith(Other, "Duke_voice_v3");
}
return true;
}
Duke_voice_v3.uc
class DukeVoice extends MaleVoiceOne;
defaultproperties
{
bAddToServerPackages=True
GroupName="KFDukeVoice"
FriendlyName="Duke Voice"
Description="Replaces player voices with Duke Nukem's voice"
}
-------------------------------------------------------------------------------------------------------------------
Again any and all information is welcome and please feel free to call me stupid and tell me whats wrong here
thanks for reading
Hi
I'm working on a sound pack for killing floor and I need some help.
ANY AND ALL INFORMATION WOULD HELP
What I'm trying to do is make a mutator that will replace the player voices with duke nukem.
I have the sound files for the duke quotes but I don't know how to make a mutator.
I want the mutator to work online on my server.
Thanks for reading and please help me out
-------------------------------------------------------------------------------------------------------------------
ENTRY TWO
Ok I've hit my first major speed bump
CODING
I took some code from a mutator that preforms a "check replacement" and edited it to what I thought looked right
(I have no idea what I'm doing here and its probably all wrong)
Anyway this is the error i get when trying to compile my mutator
"Error: D:\Program Files\Steam\games\steamapps\common\killingfloor\DukeVoice\Classes\DukeVoice.uc(30) : Error, Redefinition of 'function CheckReplacement' differs from original in Mutator
Log: Compile aborted due to errors.
Log: Failure - 1 error(s), 0 warning(s)"
Anyone no how to fix it
Take a look at the code below (its probably wrong in many ways)
Mutator code for DukeVoice.uc
-------------------------------------------------------------------------------------------------------------------
class DukeVoice extends Mutator;
// === FUNCTIONS ===
/*
Name: initmutator
Parameters: string, string
Purpose: Called when the mutator is "turned on", any setting up done here
*/
function initMutator(string Options, out string ErrorMessage) {
if(KFGameType(Level.Game) != None) { // Make sure there is a valid game
}
loginternal( "Inited Duke Voice" );
Super.initMutator(Options, ErrorMessage);
}
/*
Name: CheckReplacement
Parameters: Actor
Purpose: Allows you to replace any object in the game with another, awesomes!
*/
function bool CheckReplacement(Actor Other) {
if(Other.IsA('MaleVoiceOne') && !Other.IsA('Duke_voice_v3') ) {
loginternal( "Replaced Voices" );
ReplaceWith(Other, "Duke_voice_v3");
}
return true;
}
Duke_voice_v3.uc
class DukeVoice extends MaleVoiceOne;
defaultproperties
{
bAddToServerPackages=True
GroupName="KFDukeVoice"
FriendlyName="Duke Voice"
Description="Replaces player voices with Duke Nukem's voice"
}
-------------------------------------------------------------------------------------------------------------------
Again any and all information is welcome and please feel free to call me stupid and tell me whats wrong here
thanks for reading
Last edited: