I don't need to test my programs. I have an error-correcting modem.

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[edit]

Property group 'UTProj_StingerShard'[edit]

SpikeVictimVelFactor[edit]

Type: float


Default value: 0.5

Internal variables[edit]

BaseActor[edit]

Type: Actor

Used to keep track of what actor to base ourselves on

bCanCreateSpike[edit]

Type: bool

Used to prevent rare infinite recursion when spiking overlapping dead bodies

bSpiked[edit]

Type: bool

This is true if this projectile is currently spiking a victim

MyMesh[edit]

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[edit]

Type: Object.Vector


ShardVictimConstraint[edit]

Type: RB_ConstraintActor

This holds a link to our Constraint Actor

Default values[edit]

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[edit]

CollisionCylinder[edit]

Class: Engine.CylinderComponent

Inherits from: UTProjectile.CollisionCylinder

No new values.

ProjectileMesh[edit]

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[edit]

Static functions[edit]

CreateSpike[edit]

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[edit]

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


Events[edit]

Destroyed[edit]

simulated event Destroyed ()

Overrides: UTProjectile.Destroyed

Insure that our constraint is destroyed when we are destroyed

HitWall[edit]

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[edit]

simulated event PostBeginPlay ()

Overrides: UTProjectile.PostBeginPlay

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

Shutdown[edit]

simulated event Shutdown ()

Overrides: UTProjectile.Shutdown

Make sure to set our base properly

Other instance functions[edit]

AdjustPhysicsForHit[edit]

simulated function AdjustPhysicsForHit ()

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

ClientSideTouch[edit]

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[edit]

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[edit]

simulated function SpikeVictim (UTPawn Victim, name VictimBone)

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