Mostly Harmless

UE3:UTProj_StingerShard (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> Actor >> Projectile >> UTProjectile >> UTProj_StingerShard
Package: 
UTGame
Direct subclasses:
UTProj_LeviathanShard, UTProj_TurretShard

Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.

Properties

Property group 'UTProj_StingerShard'

SpikeVictimVelFactor

Type: float


Default value: 0.5

Internal variables

BaseActor

Type: Actor

Used to keep track of what actor to base ourselves on

bCanCreateSpike

Type: bool

Used to prevent rare infinite recursion when spiking overlapping dead bodies

bSpiked

Type: bool

This is true if this projectile is currently spiking a victim

MyMesh

Type: StaticMeshComponent

We need a pointer to our mesh component so we can switch collision when we create the constraint

Default value: StaticMeshComponent'ProjectileMesh'

OldLocation

Type: Object.Vector


ShardVictimConstraint

Type: RB_ConstraintActor

This holds a link to our Constraint Actor

Default values

Property Value
AccelRate 4500.0
CheckRadius 27.0
Components[1] StaticMeshComponent'ProjectileMesh'
Damage 38.0
LifeSpan 10.0
MaxEffectDistance 7000.0
MaxSpeed 4000.0
MomentumTransfer 70000.0
MyDamageType Class'UTGame.UTDmgType_StingerShard'
ProjExplosionTemplate ParticleSystem'WP_Stinger.Particles.P_WP_Stinger_AltFire_Surface_Impact'
Speed 2500.0

Subobjects

CollisionCylinder

Class: Engine.CylinderComponent

Inherits from: UTProjectile.CollisionCylinder

No new values.

ProjectileMesh

Class: Engine.StaticMeshComponent

Property Value
bAcceptsLights False
BlockActors False
BlockRigidBody False
bUseAsOccluder False
CachedCullDistance 12000.0
CastShadow False
CollideActors False
CullDistance 12000.0
Scale 1.5
StaticMesh StaticMesh'WP_Stinger.Mesh.S_WP_StingerShard'

Functions

Static functions

CreateSpike

static function bool CreateSpike (UTPawn DeadPawn, Object.Vector InitialHitLocation, Object.Vector Direction)

This function creates the actual spike in the world. A duplicate Shard projectile is spawned and that projectile is used to spike the pawn. We use a secondary actor in order to avoid having to wait for replication to occur since this actor is spawned client-side

FindNearestBone

static function bool FindNearestBone (UTPawn DeadPawn, Object.Vector InitialHitLocation, out name BestBone, out Object.Vector BestHitLocation)


Events

Destroyed

simulated event Destroyed ()

Overrides: UTProjectile.Destroyed

Insure that our constraint is destroyed when we are destroyed

HitWall

simulated singular event HitWall (Object.Vector HitNormal, Actor Wall, PrimitiveComponent WallComp)

Overrides: Projectile.HitWall

We have to override HitWall in order to store a pointer to the actor that we hit (in the case of non-world geometry). This way we can be stuck to tanks, etc.

PostBeginPlay

simulated event PostBeginPlay ()

Overrides: UTProjectile.PostBeginPlay

When this actor begins its life, play any ambient sounds attached to it

Shutdown

simulated event Shutdown ()

Overrides: UTProjectile.Shutdown

Make sure to set our base properly

Other instance functions

AdjustPhysicsForHit

simulated function AdjustPhysicsForHit ()

Setup this projectile's physics after it has spiked a victim

ClientSideTouch

simulated function ClientSideTouch (Actor Other, Object.Vector HitLocation)

This function is called when the touch occurs locally in a remote client. It checks to see if the pawn is already ragdolling and if so, spikes it again

ProcessTouch

simulated function ProcessTouch (Actor Other, Object.Vector HitLocation, Object.Vector HitNormal)

Overrides: UTProjectile.ProcessTouch

We only want to process the touch if we are not spike and we are not a remote client. In the case of a remote client, ClientTouch should be used.

SpikeVictim

simulated function SpikeVictim (UTPawn Victim, name VictimBone)

This function is responsible for creating the constraint between the projectile and the victim.