XIDMaps
Class USA02HelicoMuzzleFlash

source: C:\XIII\XIDMaps\Classes\USA02HelicoMuzzleFlash.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Effects
         |
         +--XIDMaps.USA02HelicoMuzzleFlash
Direct Known Subclasses:None

class USA02HelicoMuzzleFlash
extends Engine.Effects

// ==================================================================== // // ====================================================================
Variables
 EDrawType MemDrawType
           How long to display it
 int TickCount
           How long to display it

States
Visible

Function Summary
 
simulated
Flash()
     
//_____________________________________________________________________________


State Visible Function Summary



Source Code


00001	// ====================================================================
00002	//
00003	// ====================================================================
00004	
00005	class USA02HelicoMuzzleFlash extends Effects;
00006	
00007	var int TickCount;     // How long to display it
00008	
00009	//var(MuzzleFlash) ELightType FlashLightType;
00010	//var(MuzzleFlash) ELightEffect FlashLightEffect;
00011	var(MuzzleFlash) bool bUseRandRotation;
00012	var EDrawType MemDrawType;
00013	
00014	//_____________________________________________________________________________
00015	simulated event PostBeginPlay()
00016	{
00017	    MemDrawType=DrawType;
00018	    SetDrawType(DT_None);
00019	}
00020	
00021	//_____________________________________________________________________________
00022	simulated event Timer()
00023	{
00024	    SetDrawType(DT_None);
00025	//     bHidden=true;
00026	}
00027	
00028	//_____________________________________________________________________________
00029	simulated function Flash()
00030	{
00031	//    Log(self$" flashing, MemDrawType="$MemDrawType);
00032	    GotoState('Visible');
00033	}
00034	
00035	//_____________________________________________________________________________
00036	simulated state Visible
00037	{
00038	    simulated event Tick(float Delta)
00039	    {
00040	/*
00041	      Log("RelativeLocation="$RelativeLocation);
00042	      SetLocation(Controller(Owner).Pawn.Location + RelativeLocation);
00043	*/
00044	//      SetRotation(Owner.Rotation);
00045	      if ( DrawType==DT_None )
00046	        SetDrawType(MemDrawType);
00047	      if (TickCount>2)
00048	        gotoState('');
00049	      TickCount++;
00050	    }
00051	
00052	    simulated function EndState()
00053	    {
00054	      SetDrawType(DT_None);
00055	    }
00056	
00057	    simulated function BeginState()
00058	    {
00059	      local Rotator R;
00060	      local vector V;
00061	
00062	      TickCount=0;
00063	
00064	      R = RelativeRotation;
00065	      if ( bUseRandRotation )
00066	        R.roll = Rand(65535);
00067	      SetRelativeRotation(R);
00068	
00069	/*
00070	      V=Default.DrawScale3D;
00071	      V.X += frand() - 0.5;
00072	      V.Y += frand() - 0.5;
00073	
00074	      SetDrawScale3D(v);
00075	*/
00076	      SetDrawType(MemDrawType);
00077	    }
00078	}
00079	
00080	
00081	
00082	defaultproperties
00083	{
00084	     bUseRandRotation=True
00085	     DrawType=DT_StaticMesh
00086	     StaticMesh=StaticMesh'StaticExplosifs.MuzzleFlash_NMI'
00087	     DrawScale=1.500000
00088	}

End Source Code