Legacy:EnhancedItems/EnhancedMutator - Unreal Wiki

# Legacy:EnhancedItems/EnhancedMutator

### From Unreal Wiki, The Unreal Engine Documentation Site

< Legacy:EnhancedItems
UT :: Actor (UT) >> Info (UT) >> Mutator (UT) >> EnhancedMutator (Package: EnhancedItems)

This class is part of the EnhancedItems package by Wormbo.

EnhancedMutator is an abstract base class for non-Arena mutators in EnhancedItems-based mods.

## Features

- can handle Legacy:EnhancedItems/MultiPickupPlus replacement
- new RegisterHUDMutator function
- can draw on HUD before and after weapon is drawn (only if an Legacy:EnhancedItems/EnhancedWeapon is selected)
- unregisters from all mutator chains when destroyed
- activates the enhanced death messages of Legacy:EnhancedItems/EnhancedWeapon and Legacy:EnhancedItems/EnhancedProjectile

## Properties

bool bAllowOnlyOnce
  This mutator class should only exist once in a game. Any additional mutator of this class will be destroyed when it tries to add itself to the linked list of mutators.
bool bAlwaysCreateMPP (globalconfig)
  The mutator should always create a Legacy:EnhancedItems/MultiPickupPlus when replacing pickups, even if there is no need to do so.
  This can solve problems with other EnhancedMutators but can also produce new ones with non-EnhancedItems mutator. (Behavior must be implemented in CheckReplacement() of child classes.)
string MultiPickupBaseClass
  The default Legacy:EnhancedItems/MultiPickupPlus class to use when creating MPPs.

### Internal Variables

bool bMIConverterSpawned
  Tells, whether the Legacy:EnhancedItems/MIConverter was already spawned.
bool bPendingHUDRegistration
  Set to True when the RegisterHUDMutator() function has failed. The mutator will try to register again in the next Tick. You can set this to True in default properties to automatically let the mutator register itself as HUD mutator. (See function RegisterHUDMutator() below.)
Legacy:EnhancedItems/EIDeathMessageMutator EIDMM
  A reference to the EIDeathMessageMutator that enables the enhanced death messages.
ChallengeHUD MyChallengeHUD
  Reference to the local HUD, typecasted to ChallengeHUD, for HUD mutators.
HUD (UT) MyHUD
  Reference to the local HUD for HUD mutators.
PlayerPawn PlayerOwner
  Reference to the local PlayerPawn for HUD mutators.

## Methods

### General

AddMutator(Mutator (UT) M)
  Makes sure the mutator isn't re-added to the mutators list if it's already there.

bool ClassIsA(class aClass, coerce string DesiredType) [static, final]
  Returns, whether a class is of a specific type or identical to that type. (see IdenticalTo property of many EnhancedItems classes)

Destroyed( ) [simulated]
  Unregisters the mutator from all of the four linked lists of mutators: mutators list, message mutators list, damage mutators list and HUD mutators list.

Legacy:EnhancedItems/EIDMMutator GetDMMutator( )
  Returns a reference to the Legacy:EnhancedItems/EIDMMutator. It will be created using ReplaceDMMutator() if it doesn't yet exist.

Weapon (UT) GiveWeapon(Pawn (UT) PlayerPawn, string aClassName, optional bool bBringUp)
  Gives the specified weapon to a player.

bool OtherIsA(Actor (UT) Other, name DesiredType) [static, final]
  Returns, whether an actor is of a specific type or identical to that type. (see IdenticalTo property of many EnhancedItems classes)

PreBeginPlay( )
  Spawns the Legacy:EnhancedItems/MIConverter, the EIChallengeHUD mutator (if desired) and the Legacy:EnhancedItems/EIDeathMessageMutator. (if it doesn't exist yet)

ReplaceDMMutator( )
  Replaces the base mutator with the Legacy:EnhancedItems/EIDMMutator if it's a DMMutator.

Inventory (UT) ReplaceWithItem(Inventory (UT) Other, coerce string aClassName) [final]
  Replacement for the Mutator.ReplaceWith() function with better handling for Inventory (UT) classes.

RestoreKillType( ) [final]
  Reverts the effect of SetKillType(). Call this exactly as often as SetKillType() after doing damage or directly killing players.

SetKillType(bool bSplashHit, bool bHeadHit, class<Actor (UT)> DamageProjectileClass) [final]
  Prepares the specified Legacy:EnhancedItems/EnhancedWeapon or Legacy:EnhancedItems/EnhancedProjectile class' death messages to be used when a player is killed. Call this function before you damage or kill a player and revert its effect after you're done.

SpawnEIChallengeHUD( )
  Tries to spawn the EIChallengeHUD HUD mutator, which modifies the player status icon.

SpawnMIConverter( )
  Spawns the Legacy:EnhancedItems/MIConverter if it doesn't already exist.

string StaticGetItemName(string FullName) [static]
  Actor.GetItemName() as static function.

### HUD Mutator Related

Tick(float DeltaTime) [simulated]
  Tries to register this mutator as HUD mutator if bPendingHUDRegistration=True.

PostRender(Canvas (UT) Canvas) [simulated]
  Fixed version of [[Mutator (UT)]Mutator].PostRender(), which properly calls the next HUD mutator's PostRender().

PostRenderOverlaysFor(Weapon (UT) W, Canvas (UT) C) [simulated]
  Called for all EnhancedMutators after an Legacy:EnhancedItems/EnhancedWeapon's RenderOverlays() and before calling the PostRenderOverlaysFor() function for any Legacy:EnhancedItems/PickupPlus registered as that weapon's affector.

bool PreRenderOverlaysFor(Weapon (UT) W, Canvas (UT) C) [simulated]
  Called for all EnhancedMutators before an Legacy:EnhancedItems/EnhancedWeapon's RenderOverlays() and before calling the PreRenderOverlaysFor() function for any Legacy:EnhancedItems/PickupPlus registered as that weapon's affector.
  If this function returns true, the mutator will handle drawing the Legacy:EnhancedItems/EnhancedWeapon and the weapon's OldRenderOverlays() function and all PostRenderOverlaysFor() functions will be skipped. PreRenderOverlaysFor() calls for other EnhancedMutators or Legacy:EnhancedItems/PickupPlus affectors will not be skipped.

RegisterHUDMutator( ) [simulated]
  Registers the mutator as HUD mutator. This modified version not only registers the mutator, but also sets the PlayerOwner, MyHUD and MyChallengeHUD variables to the local PlayerPawn and HUD (UT) respectively. Note that if the mutator's Owner is a PlayerPawn it will only register as that player's HUD mutator.

### Legacy:EnhancedItems/MultiPickupPlus Related

bool AlwaysKeepInMPP(Legacy:EnhancedItems/MultiPickupPlus Other, class<Inventory (UT)> ItemClass)
  Returns, whether an inventory class should not be reomved from a Legacy:EnhancedItems/MultiPickupPlus.

bool CheckMPP(Legacy:EnhancedItems/MultiPickupPlus Other)
  Allowes the mutator to modify a newly spawned Legacy:EnhancedItems/MultiPickupPlus before it starts spawning items.

Legacy:EnhancedItems/MultiPickupPlus ConvertToMPP(Inventory (UT) Other, optional string MPPClass) [final]
  Converts a pickup to a Legacy:EnhancedItems/MultiPickupPlus and adds the item class to it.

Legacy:EnhancedItems/MultiPickupPlus ReplaceWithItemAsMPP(Inventory (UT) Other, coerce string aClassName, optional vector NewItemOffset, optional float NewInitTime, optional float NewChance, optional float NDuration) [final]
  Replaces an item with a Legacy:EnhancedItems/MultiPickupPlus and adds an item of the specified class to it.

Legacy:EnhancedItems/MultiPickupPlus ReplaceWithMPP(Inventory (UT) Other, optional string MPPClass) [final]
  Replaces an item with an empty Legacy:EnhancedItems/MultiPickupPlus.

## Known Subclasses

- EIChallengeHUD – draws the enhanced player status icon
- Legacy:EnhancedItems/EIDeathMessageMutator
- EIUseHoldable – utility class for Legacy:EnhancedItems/HoldablePickups
- Legacy:EnhancedItems/MIConverter
- NoAlwaysAutoActivate – resets the bAutoActivate values of all Pickups to their default values after DMMutator set all of them to True

### ...in other mods (only some)

- ArenaPhysicsMutator – the mutator responsible for the non-Arena changes in Arena Match
- ERelicHUDMutator – the HUD mutator of EnhancedRelics

Category: Legacy Custom Class (UT)

##### Views

- Legacy
- Discussion
- Current revision

##### Search