UnrealShare
Class WallHitEffect

source: e:\games\UnrealTournament\UnrealShare\Classes\WallHitEffect.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Effects
         |
         +--UnrealShare.AnimSpriteEffect
            |
            +--UnrealShare.SpriteSmokePuff
               |
               +--UnrealShare.WallHitEffect
Direct Known Subclasses:HeavyWallHitEffect, LightWallHitEffect

class WallHitEffect
extends UnrealShare.SpriteSmokePuff

//============================================================================= // WallHitEffect. //=============================================================================

Function Summary
 
simulated
PostBeginPlay()
 
simulated
SpawnEffects()



Source Code


00001	//=============================================================================
00002	// WallHitEffect.
00003	//=============================================================================
00004	class WallHitEffect extends SpriteSmokePuff;
00005	
00006	#exec AUDIO IMPORT FILE="..\Unreali\Sounds\minigun\imp01.WAV" NAME="Impact1" GROUP="Minigun"
00007	#exec AUDIO IMPORT FILE="..\Unreali\Sounds\minigun\imp02.WAV" NAME="Impact2" GROUP="Minigun"
00008	#exec AUDIO IMPORT FILE="Sounds\stinger\Ricochet.WAV" NAME="Ricochet" GROUP="Stinger"
00009	
00010	simulated function PostBeginPlay()
00011	{
00012		Super.PostBeginPlay();
00013		if ( Instigator != None )
00014			MakeNoise(0.3);
00015	
00016		SpawnEffects();
00017	}
00018	
00019	simulated function SpawnEffects()
00020	{
00021		local Actor A;
00022		local float decision;
00023	
00024		decision = FRand();
00025		if (decision<0.1) 
00026			PlaySound(sound'ricochet',, 1,,1200, 0.5+FRand());		
00027		if ( decision < 0.35 )
00028			PlaySound(sound'Impact1',, 2.0,,1200);
00029		else if ( decision < 0.6 )
00030			PlaySound(sound'Impact2',, 2.0,,1200);
00031	
00032		if (FRand()< 0.3) 
00033		{
00034			A = spawn(class'Chip');
00035			if ( A != None )
00036				A.RemoteRole = ROLE_None;
00037		}
00038		if (FRand()< 0.3) 
00039		{
00040			A = spawn(class'Chip');
00041			if ( A != None )
00042				A.RemoteRole = ROLE_None;
00043		}
00044		if (FRand()< 0.3)
00045		{
00046			A = spawn(class'Chip');
00047			if ( A != None )
00048				A.RemoteRole = ROLE_None;
00049		}
00050		A = spawn(class'SmallSpark2',,,,Rotation + RotRand());
00051		if ( A != None )
00052			A.RemoteRole = ROLE_None;
00053	}
00054	
00055	defaultproperties
00056	{
00057	}

End Source Code