Mostly Harmless

UE3:Mutator (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Actor >> Info >> Mutator
Package: 
Engine
Direct subclass:
UTMutator
This class in other games:
RTNP, U1, UT, U2XMP, U2, UE2Runtime, UT2003, UT2004, UT3

Mutator.

Mutators allow modifications to gameplay while keeping the game rules intact. Mutators are given the opportunity to modify player login parameters with ModifyLogin(), to modify player pawn properties with ModifyPlayer(), or to modify, remove, or replace all other actors when they are spawned with CheckRelevance(), which is called from the PreBeginPlay() function of all actors except those (Decals, Effects and Projectiles for performance reasons) which have bGameRelevant==true.

Properties

Property group 'Mutator'

GroupNames

Type: array<string>

list of groups this mutator is in. Mutators that share any group cannot be activated simultaneously

Internal variables

bUserAdded

Type: bool


NextMutator

Type: Mutator


Default values

Property Value
CollisionType COLLIDE_CustomDefault

Subobjects

Sprite

Class: Engine.SpriteComponent

Inherits from: Info.Sprite

Property Value
ReplacementPrimitive None

Functions

Events

Destroyed

event Destroyed ()

Overrides: Actor.Destroyed


PreBeginPlay

event PreBeginPlay ()

Overrides: Actor.PreBeginPlay


Other instance functions

AddMutator

function AddMutator (Mutator M)


AlwaysKeep

function bool AlwaysKeep (Actor Other)


CanLeaveVehicle

function bool CanLeaveVehicle (Vehicle V, Pawn P)


CheckEndGame

function bool CheckEndGame (PlayerReplicationInfo Winner, string Reason)


CheckRelevance

function bool CheckRelevance (Actor Other)


CheckReplacement

function bool CheckReplacement (Actor Other)

Returns true to keep this actor

DriverEnteredVehicle

function DriverEnteredVehicle (Vehicle V, Pawn P)


DriverLeftVehicle

function DriverLeftVehicle (Vehicle V, Pawn P)


FindPlayerStart

function NavigationPoint FindPlayerStart (Controller Player, optional byte InTeam, optional string incomingName)


GetSeamlessTravelActorList

function GetSeamlessTravelActorList (bool bToEntry, out array<ActorActorList)

called on the server during seamless level transitions to get the list of Actors that should be moved into the new level PlayerControllers, Role < ROLE_Authority Actors, and any non-Actors that are inside an Actor that is in the list (i.e. Object.Outer == Actor in the list) are all automatically moved regardless of whether they're included here only dynamic (!bStatic and !bNoDelete) actors in the PersistentLevel may be moved (this includes all actors spawned during gameplay) this is called for both parts of the transition because actors might change while in the middle (e.g. players might join or leave the game)

Parameters:

  • bToEntry - true if we are going from old level -> entry, false if we are going from entry -> new level
  • ActorList - out) list of actors to maintain

GetServerDetails

function GetServerDetails (out Info.ServerResponseLine ServerState)


GetServerPlayers

function GetServerPlayers (out Info.ServerResponseLine ServerState)


HandleRestartGame

function bool HandleRestartGame ()


InitMutator

function InitMutator (string Options, out string ErrorMessage)

This function can be used to parse the command line parameters when a server starts up

IsRelevant

function bool IsRelevant (Actor Other)


ModifyLogin

function ModifyLogin (out string Portal, out string Options)


ModifyPlayer

function ModifyPlayer (Pawn Other)


Mutate

function Mutate (string MutateString, PlayerController Sender)


MutatorIsAllowed

function bool MutatorIsAllowed ()


NetDamage

function NetDamage (int OriginalDamage, out int Damage, Pawn Injured, Controller InstigatedBy, Object.Vector HitLocation, out Object.Vector Momentum, class<DamageTypeDamageType, Actor DamageCauser)


NotifyLogin

function NotifyLogin (Controller NewPlayer)


NotifyLogout

function NotifyLogout (Controller Exiting)


OverridePickupQuery

function bool OverridePickupQuery (Pawn Other, class<InventoryItemClass, Actor Pickup, out byte bAllowPickup)

OverridePickupQuery() when pawn wants to pickup something, mutators are given a chance to modify it. If this function returns true, bAllowPickup will determine if the object can be picked up.

Parameters:

  • Other - the Pawn that wants the item
  • ItemClass - the Inventory class the Pawn can pick up
  • Pickup - the Actor containing that item (this may be a PickupFactory or it may be a DroppedPickup)
  • bAllowPickup - out) whether or not the Pickup actor should give its item to Other (0 == false, anything else == true)

Returns:

whether or not to override the default behavior with the value of

ParseChatPercVar

function string ParseChatPercVar (Controller Who, string Cmd)


PreventDeath

function bool PreventDeath (Pawn Killed, Controller Killer, class<DamageTypedamageType, Object.Vector HitLocation)


ScoreKill

function ScoreKill (Controller Killer, Controller Killed)


ScoreObjective

function ScoreObjective (PlayerReplicationInfo Scorer, int Score)