mutators are similar to gamemodes. you can start them with full onlinecompability. clients can join without having the files. has the advantage that you can run multiple mutators and use other gamemodes at the same time.
dm_engine?gamemode=mpgame.dmgame?mutator=mutatorpackage.mutatorname
that'd be a commandline with which you could start a mutator.
simple example of a mutator:
class ScopeMutator extends Mutator;
var(Scope) class<DC17mSniperScope> ScopeAttachment;
var DC17mSniperScope Scope;
function Mutate(string MutateString, PlayerController Sender)
{
local vector start;
if ((sender.pawn != None) && (sender.pawn.weapon !=None))
{
if (MutateString ~= "AddScope")
{
Start = Sender.Pawn.weapon.GetBoneLocation('weaponAttach_R');
Scope = Spawn(ScopeAttachment,,, Start);
Sender.Pawn.weapon.AttachToBone(Scope,'weaponAttach_R');
Scope.SetRelativeLocation(vect(0,0,0));
Scope.SetRelativeRotation(rot(0,0,0));
log(" scope should attach now");
}
}
}
wanted to make a code with which you can attach the dc17msniperscope to other weapons.
the function mutate gets called via a console command. the command is "mutate mutatestring" and every client is able to use it. the code checks whether the controller who calls the function has a pawn and a weapon[if ((sender.pawn != None) && (sender.pawn.weapon !=None))] and whether the mutatestring is "addscope" [if (MutateString ~= "AddScope")](that means the real console command would be "mutate addscope") and then it finds out where the location of the bone called weaponattach_r of the 3dmodel of your hudarms is [Start = Sender.Pawn.weapon.GetBoneLocation('weaponAttach_R');] and it spawns the scope[Scope = Spawn(ScopeAttachment,,, Start);], attaches it to the bone [Sender.Pawn.weapon.AttachToBone(Scope,'weaponAttach_R');] and sets the relative location/rotation.
go to the ccpserver, open console and type "mutate addscope" and your blaster will have a scope.
if you use that code you'll have to go to the defaultproperties, open the category "scope" and select the scopeclass.
tx's instagib was not made with a mutator but it would have been easier with it. don't know who made it.