SpatialFear.SFDecoration

Spatial Fear
Class: SFDecoration
Description: Subclass of Decoration, allows destroying of decorations.
When bDestroyable is TRUE and damage is inflicted to decoration, object of type
EffectWhenDamaged is spawned. When Health drops to zero or less decoration is
destroyed, object of type EffectWhenDestroyed is spawned and chunks of type
ChunkType are spawned. If there's necessity for more advanced damage proccesing when decoration gets
hit, it is a good idea not to override TakeDamage function as it's responsible for spawning
effects and stuff. Override ModifyDamage function instead (it's alwayes called by TakeDamage).

Effect info: EffectWhenDamaged and EffectWhenDestroyed could be any sub-class of Actor, but in most cases they
would probablybe some sub-class of Effects class. EffectWhenDamaged object is spawned in location where
decoration was hit and it's rotated into direcion of player.

Chunks info: There are four types of chunks in UT: Fragment1, GlassFragments, WallFragments, WoodFragments.
You can change size and number of chunks with ChunkNumber and ChunkScale variables.
If you don't wanna your decoration to break into pieces after being destroyed, set ChunksNumber to 0,
(0 is default value of ChunksNumber so if you do wanna use chunks don't forget to change it).

You can also change texture used as a skin for chunks. If you don't wanna use chunk's default skin, set
bCustomChunkSkin to TRUE and ChunkSkin to texture you wanna use.

IMPORTANT!!! if you wanna create destroyable decoration you have to set bStatic to false,
if you don't your decko can't be destroyed, even with Health below zero

Author: Jacek Zagrodzki (moose)

Extends:
Modifiers:
Source code

SpatialFear.SFDecoration
%%

Variables

%function_comment%
boolbCustomChunkSkin
%function_comment%
boolbDestroyable
%function_comment%
boolbThrowable
%function_comment%
floatChunkScale
%function_comment%
textureChunkSkin
%function_comment%
intChunksNumber
%function_comment%
class<Fragment>ChunkType
%function_comment%
class<actor>EffectWhenDamaged
%function_comment%
class<actor>EffectWhenDestroyed
%function_comment%
travelintHealth

Functions

Override this function if there's necessity for more advanced damage proccesing when decoration gets hit.
?
ModifyDamage (out int Damage, out Pawn EventInstigator, out vector HitLocation, out vector Momentum, out name DamageType)
PostBeginPlay ()
TakeDamage (int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType)

Default properties

{
     bThrowable=True
     ChunkScale=1.000000
     bCollideActors=True
     bCollideWorld=True
     bBlockActors=True
     bBlockPlayers=True
     bProjTarget=True
     Mass=100.000000
}


class file time: 12/7/2003 3:58:24 PM - creation time: 12/7/2003 4:03:39 PM
Created with UnCodeX