Originally posted by usaar33
It is inside the umod.
Alright, I looked at the code inside of the UMOD and yeah it's looks like it's self explanatory to someone who already know how to code but I don't know anything! Someone else gave me a code to accomplish what I'm trying to do, I don't understand it too well either but it appears to be much simpler than the one inside the UMOD... Maybe you could take a look at this code and tell what to do with it, I don't know if I'm to sublass the "DMMutator" and take out the weapon replacement line of and put this in or just create a new subclass and put this new code in and use it asa game type, the thing is I'd like this to be scripted right into the level so hat it would require the addtional download or a MOD or Mutator, the code he gave me and what he said about it is below. I attempted to compile this and it did do something... it's just that you UT didn't find the edit package, so if someone could also tell me how to compile correctly that would be cool.
------------------------------------------------------------------------------------
Every GameType class has a BaseMutatorClass property which is set to class'Botpack.DMMutator' for all UT gametypes.
Try this:
Subclass Botpack.DMMutator and remove the weapon replacement stuff from CheckReplacement(). If you want to create a new gametype use the new subclass as the BaseMutator.
If you want to write a mutator put the following code in it:
code:----------------------------------------------------------------------------
function ReplaceDMMutator()
{
local Mutator M, PrevMutator, BaseNextMutator, NewBaseMutator;
log("Replacing BaseMutator...");
if ( Level.Game.IsA('DeathMatchPlus') && Level.Game.BaseMutator.Class == Class'Botpack.DMMutator' ) {
For ( M = Level.Game.BaseMutator; M != None; M = M.NextMutator )
if ( M.NextMutator == Self ) {
PrevMutator = M;
break;
}
if ( PrevMutator != None )
PrevMutator.NextMutator = NextMutator;
BaseNextMutator = Level.Game.BaseMutator.NextMutator;
NewBaseMutator = Spawn(class'YourPackage.YourNewDMMutatorSubclass');
if ( NewBaseMutator != None ) {
NewBaseMutator.NextMutator = BaseNextMutator;
Level.Game.BaseMutator.Destroy();
Level.Game.BaseMutator = NewBaseMutator;
}
log("BaseMutator now is"@Level.Game.BaseMutator);
}
else
log("BaseMutator still is"@Level.Game.BaseMutator);
}
--------------------------------------------------------------------------------
Call ReplaceDMMutator() inside PreBeginPlay() to replace the base mutator.
If you just want to make a map it might become more difficult. Try creating a hidden actor that has the replacement code inside and put it somewhere in your map. (I don't know if this works.)