RuneI
Class OdinCrow

source: c:\runehov\RuneI\Classes\OdinCrow.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Pawn
         |
         +--RuneI.ScriptPawn
            |
            +--RuneI.Bird
               |
               +--RuneI.Crow
                  |
                  +--RuneI.OdinCrow
Direct Known Subclasses:None

class OdinCrow
extends RuneI.Crow

//============================================================================= // OdinCrow. //=============================================================================
States
FadingOut

Function Summary
 void Died(Pawn Killer, name damageType, vector HitLocation)
 void PostBeginPlay()
 void Timer()


State FadingOut Function Summary
 void Tick(float DeltaSeconds)
 void BeginState()



Source Code


00001	//=============================================================================
00002	// OdinCrow.
00003	//=============================================================================
00004	class OdinCrow expands Crow;
00005	
00006	function PostBeginPlay()
00007	{
00008		Super.PostBeginPlay();
00009		SetTimer(1+FRand()*1, false);
00010	}
00011	
00012	function Timer()
00013	{
00014		local Odin O;
00015		foreach AllActors(class'Odin', O)
00016		{
00017			if (O.CrowRadius != 0)
00018				CircleRadius = O.CrowRadius;
00019			break;
00020		}
00021	}
00022	
00023	function Died(pawn Killer, name damageType, vector HitLocation)
00024	{
00025		if(GetStateName() != 'FadingOut')
00026			GotoState('FadingOut');
00027	}
00028	
00029	state FadingOut
00030	{
00031		function BeginState()
00032		{
00033			Style = STY_AlphaBlend;
00034			AlphaScale = 1.0;
00035			Enable('Tick');
00036		}
00037		
00038		function Tick(float DeltaSeconds)
00039		{
00040			AlphaScale -= DeltaSeconds * 0.25;
00041			if(AlphaScale <= 0)
00042				Destroy();
00043		}
00044	begin:
00045	}
00046	
00047	defaultproperties
00048	{
00049	     AcquireSound=None
00050	     SoundPitch=64
00051	     AmbientSound=Sound'MurmurSnd.Birds.bird17L'
00052	}

End Source Code