| Home Page | Recent Changes

EnhancedItems/EnhancedProjectile

UT :: Actor (UT) >> Projectile (UT) >> EnhancedProjectile (Package: EnhancedItems)

This class is part of the EnhancedItems package by Wormbo.

Features

  • death/suicide messages for projectiles (independant from weapon)
  • headshot support with extra damage type, death/suicide messages and damage factor
  • splash damage support with extra damage type and death/suicide messages and different momentum transfer
  • can be used as a "DamageType" by declaring an abstract class and specifying it as DeathMessageActorClass in /EnhancedWeapon and EnhancedProjectile or as DamageProjectileClass in the SetKillType() function of /PickupPlus?, /EnhancedAmmo, /EIEffects or /EnhancedMutator
  • can remember the instigator's DamageScaling and apply it at explosion time

Properties

Globalconfig Properties

bool bDropEffects
Whether the projectile should drop some visual effects to increase game performance.
bool bKeepLightEffects
Tells the projectile to keep its light effects enabled even with bDropEffects=True or under low-FPS conditions. This setting is intended to be used in combination with a darkmatch mutator, but is also useful on darked maps in general.

Localized Properties

string ProjectileName
This projectile's name. (used in death messages)

The following properties are death messages and you can use these placeholders in them:

%k Killing player's name
%o Other (killed) player's name
%w Weapon used to make the kill (not the weapon held while making the kill!)
%p Name of the projectile used
string DirectHitString
Death message for kills via direct hits.
string HeadHitString
Death message for headshots (if the projectile can cause headshots, see next section).
string HeadSuicideFString
Suicide message for female models for self-headshots.
string HeadSuicideString
Suicide message for male models for self-headshots.
string SplashHitString
Death message for kills via splash damage.
string SuicideFString
Suicide message for female models for suicides via direct hit or splash damage.
string SuicideString
Suicide message for male models for suicides via direct hit or splash damage.

Other Properties

bool bCanHeadShoot
Whether this projectile behaves differently (different damage and/or death message) when it hits a player's head.
bool bConstantSplashDamage
Whether the projectile's explosion splash damage is the same in the whole splash area. Keep this set to False if the damage should fall off linearly with the distance to the projectile's impact location.
bool bKeepDamageScaling
The projectile's damage (like any damage) is scaled by the instigator Pawn's DamageScaling. When this property is set to true, the Instigator's DamageScaling from the moment when the projectile is fired is used instead of when it hits.
float DamageRadius
Radius of the splash damage area.
class<Actor (UT)> DeathMessageActorClass
When set to an /EnhancedWeapon or EnhancedProjectile class, that class' death messages are used instead of this one's.
class<Effects (UT)> ExplosionEffectClass
This effect is spawned when the projectile explodes.
class<Inventory (UT)> FiredFrom
The weapon class this projectile is fired from. That weapon's InventoryName is used for the %w placeholder in the death message.
name HeadDamageType
Name of the damage type to use for headshots. Use 'Decapitated' to let UT display its "Headshot!" announcement for the killer.
float HeadShotDamageFactor
The damage done by a headshot is the projectile's Damage multiplied by HeadShotDamageFactor.
float HeadShotHeight
This defines the height, over which hits are counted as headshots. 0 means the center of the player's collision cylinder, 1 is the top, -1 is the bottom. The value used for UT's sniper rifle is 0.62, which also is the default value here.
class<LocalMessage (UT)> HeadShotMessage
A custom LocalMessage (UT) displayed to both the killer and the victim after a headshot. The LocalMessage class should react to the following switches:
  1. Message is displayed to the killer
  2. Message is displayed to the victim
  3. Message is displayed to the player after a headshot suicide :D
Mods using the EnhancedItems package don't neccessarily need to make a difference here. E.g. both the EnhancedItems Ripper and the Rockets UT Mercury Missiles just use UT's headshot announcement and display it to killer and victim. (This includes Ripper self-headshots. ;))
name IdenticalTo
Used by the OtherIsA() and ClassIsA() functions in various EnhancedItems base classes to identify an actor or class as being similar to this one. For example, the ERelicDeathInventory class (the Relic of Death pickup of the Enhanced Relics mutator) has IdenticalTo=RelicDeathInventory. This will cause OtherIsA(aPickup, 'RelicDeathInventory') to rturn True not only for actual subclasses of RelicDeathInventory, but also for the ERelicDeathInventory and any other EnhancedItems-based classes that have IdenticalTo=RelicDeathInventory in their default properties.
float MomentumModifier
How the instigator's DamageScaling affects the momentum applied by this projectile's explosion.
= 0 no effect
> 0 Momentum becomes higher with a higher DamageScaling value.
< 0 Momentum is reduced with a higher DamageScaling value.
name SplashDamageType
Damage type to use for splash damage.
float SplashMomentum
Momentum aplied by splash damage.
float SplashRangeModifier
How the splash range is affected by the instigator's damage scaling. This works the same way as MomentumModifier.
class<Projectile (UT)> SubMunitionClass
What type of projectiles should be spawned when this projectile explodes.
int SubMunitionCount
How many sub-projectiles should be spawned.

Internal Variables

bool bLifeSpanMode
bool bNoLifeSpan
Used internally by the LiveSpanMode() function.
Actor (UT) MyTarget (replicated to clients)
A replicated version of the Target variable. Use this for whatever you like.
/EIDeathMessageMutator EIDMM
The EIDeathMessageMutator is spawned by /EnhancedWeapons to make the EnhancedItems death messages work. You will have to spawn it yourself if your mod doesn't contain any /EnhancedWeapons and no other mod spawned it yet.
float SpawnDamageScaling (replicated to clients)
When bKeepDamageScaling=True, this holds the instigator's DamageScaling at the moment the projectile was fired.

Methods

Inherited From Actor (UT)

string GetHumanName( )
Returns a human-readable name for this projectiole, usually the ProjectileName.
HitWall(vector HitNormal, Actor (UT) Wall)
Lets the projectile explode when it hits a wall.
Spawned( )
If authorative (see Role) and bKeepDamageScaling, this event remembers the instigator's DamageScaling.

Inherited From Projectile (UT)

BlowUp(vector HitLocation)
Explode(vector HitLocation, vector HitNormal)
This function is not as flexible in usage as the new Explosion() function, which replaces it.

New Functions

name AdjustSplashDamageType(Actor (UT) Other)
Allowes you to use different damage types for different actors in the slpash area.
bool ClassIsA(class aClass, coerce string DesiredType)
Returns, whether a class is of a specific type or identical to that type. (see IdenticalTo property)
DirectHit(vector HitLocation, Actor (UT) Other, optional vector HitNormal, optional bool bSpecialHit)
Damages Other at HitLocation. bSpecialHit tells whether the headshot death mesages of the regular damage type should be used.
vector EstimatedHitNormal(out vector HitLocation, out Actor (UT) HitActor, optional vector CurLocation, optional vector Distance, optional bool bHitLevelOnly, optional vector Extend)
Tries to estimate the projectile's impact location, hit normal and hit actor.
Explosion(optional vector HitLocation, optional vector HitNormal, optional Actor (UT) HitActor)
bool LifeSpanMode( )
Returns whether the LiveSpan mutator by Uncommon or any similar mod (e.g. Rocket UT's fun mode "Live Span") is in use. Projectiles should stay around longer in this case.
ModifySubMunition(Projectile (UT) Other)
Allowes you to modify each sub-projectile spawned.
bool OtherIsA(Actor (UT) Other, name DesiredType)
Returns, whether an actor is of a specific type or identical to that type. (see IdenticalTo property)
RestoreKillType( )
Reverts the effect of SetKillType(). Call this exactly as often as SetKillType() after doing damage or directly killing players.
class<Actor (UT)> ReturnMessageActor( )
Returns the DeathMessageActorClass if that's a subclass of /EnhancedWeapon or EnhancedProjectile, otherwise returns this class.
rotator RotationFromVector(vector NewDirection, optional rotator OldRotator)
Converts a vector to a rotator, mainatining OldRotator's Roll component.
SetKillType(bool bSplashHit, bool bHeadHit)
Prepares this class' death messages to be used when a player is killed. Call this function if you use neither DirectDamage() nor SplashDamage() to do damage or kill a player and revert its effect after you're done.
SpawnExplosionEffects(vector HitLocation, vector HitNormal)
Spawns an explosion effect.
SpawnSubMunition(vector HitLocation, vector HitNormal, int Amount)
Spawns the specified number of sub-projectiles flying into random directions. You can use HitNormal to somewhat restrict the randomness of the projectiles' directions.
SplashDamage(optional vector HitLocation, optional Actor (UT) Other, optional vector HitNormal, optional bool bSpecialHit)
Similar to the HurtRadius() function, but deals out a direct hit to Other instead of doing splash dmaage to it. bSpecialHit tells whether the headshot death mesages of the regular damage type should be used for the direct hit.

Category Class (UT)
Category Custom Class

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In