UnrealShare
Class Wire

source: e:\games\UnrealTournament\UnrealShare\Classes\Wire.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Decoration
         |
         +--UnrealShare.Wire
Direct Known Subclasses:SmallWire

class Wire
extends Engine.Decoration

//============================================================================= // Wire. //=============================================================================
Variables
 enum EWireType

States
Idle, Animate

Function Summary
 void TakeDamage(int NDamage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType)


State Idle Function Summary


State Animate Function Summary



Source Code


00001	//=============================================================================
00002	// Wire.
00003	//=============================================================================
00004	class Wire extends Decoration;
00005	
00006	#exec MESH IMPORT MESH=WireM ANIVFILE=MODELS\wire_a.3D DATAFILE=MODELS\wire_d.3D X=0 Y=0 Z=0
00007	#exec MESH ORIGIN MESH=WireM X=-10 Y=0 Z=-80 YAW=0
00008	#exec MESH SEQUENCE MESH=WireM SEQ=All     STARTFRAME=0  NUMFRAMES=60
00009	#exec MESH SEQUENCE MESH=WireM SEQ=Swing   STARTFRAME=0  NUMFRAMES=24
00010	#exec MESH SEQUENCE MESH=WireM SEQ=Still   STARTFRAME=24 NUMFRAMES=2 RATE=3
00011	#exec MESH SEQUENCE MESH=WireM SEQ=Still2  STARTFRAME=26 NUMFRAMES=1
00012	#exec MESH SEQUENCE MESH=WireM SEQ=Wiggle  STARTFRAME=27  NUMFRAMES=33
00013	#exec TEXTURE IMPORT NAME=JWire1 FILE=MODELS\wire.PCX GROUP="Skins"
00014	#exec OBJ LOAD FILE=Textures\fireeffect25.utx PACKAGE=UnrealShare.Effect25
00015	#exec MESHMAP SCALE MESHMAP=WireM X=0.13 Y=0.13 Z=0.26
00016	#exec MESHMAP SETTEXTURE MESHMAP=WireM NUM=1 TEXTURE=JWire1
00017	#exec MESHMAP SETTEXTURE MESHMAP=WireM NUM=0 TEXTURE=UnrealShare.Effect25.FireEffect25
00018	
00019	var() enum EWireType
00020	{
00021		E_WireHittable,
00022		E_WireWiggle
00023	} WireType;
00024	
00025	function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, 
00026						Vector momentum, name damageType)
00027	{
00028		local rotator MyRotation,HitRotation;
00029		if (WireType == E_WireHittable && AnimSequence!='Swing') {
00030			MyRotation = rotator(momentum);
00031			MyRotation.pitch = 0;
00032			SetRotation(MyRotation);
00033			PlayAnim('Swing',0.35);
00034			GoToState('Idle');
00035		}
00036	}
00037	
00038	
00039	
00040	Auto State Animate
00041	{
00042	Begin:
00043		if (WireType == E_WireWiggle) LoopAnim('Wiggle',0.7);
00044		else LoopAnim('Still',FRand()*0.3+0.2);
00045		FinishAnim();
00046		GoTo('begin');
00047	}
00048	
00049	State Idle
00050	{
00051	Begin:
00052		FinishAnim();
00053		PlayAnim('Still',FRand()*0.3+0.2);
00054		GoTo('Begin');
00055	}
00056	
00057	defaultproperties
00058	{
00059	     WireType=E_WireWiggle
00060	     bStatic=False
00061	     DrawType=DT_Mesh
00062	     Mesh=LodMesh'UnrealShare.WireM'
00063	     CollisionRadius=5.000000
00064	     CollisionHeight=60.000000
00065	     bCollideActors=True
00066	     bProjTarget=True
00067	}

End Source Code