## XIDPawn
Class XIIIChuteEmiter

source: C:\XIII\XIDPawn\Classes\XIIIChuteEmiter.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Emitter
             |
             +--XIDPawn.XIIIChuteEmiter

Direct Known Subclasses:None

class XIIIChuteEmiter
extends Engine.Emitter

    //-----------------------------------------------------------
    //
    //-----------------------------------------------------------

Variables
`int` | `index`
`bool` | `initialized`
`Pawn` | `lastDamagedBy`
`int` | `lastType`

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class XIIIChuteEmiter extends Emitter;
    00005
    00006	var int index;
    00007	var int lastType;
    00008	var Pawn lastDamagedBy;
    00009	var bool initialized;
    00010
    00011	//SOUTHEND Added code to make it AAAAHHAAHHAA instead of AAAAAAAAAAAAA
    00012
    00013	//_____________________________________________________________________________
    00014	event PostBeginPlay( )
    00015	{
    00016		index = 0;
    00017		SetTimer(0.1,false);
    00018		lastType = 0;
    00019	}
    00020
    00021
    00022	//_____________________________________________________________________________
    00023	event timer()
    00024	{
    00025	  local float r;
    00026
    00027	  //SOUTHEND
    00028	  // For XBOX only - Start a camera showing the falling actor
    00029	  local CWndFalling CWnd;
    00030
    00031	  if (!initialized)
    00032	  {
    00033		  initialized = true;
    00034		  if ( (Level.Game != none) && (Level.Game.DetailLevel > 1) )
    00035		  {
    00036		      if ( (lastDamagedBy != none) && (XIIIPlayerController(lastDamagedBy.Controller) != none) )
    00037		      {
    00038		        DebugLog("Falling CWND");
    00039		        CWnd = Spawn(class'XIII.CWndFalling',self);
    00040		        if ( CWnd != none )
    00041		        {
    00042		          CWnd.Falling = Owner;
    00043		          CWnd.CamPos = Owner.Location + vect(0,0,30);
    00044		          CWnd.MyHudForFX = XIIIBaseHUD(XIIIPlayerController(lastDamagedBy.Controller).MyHud);
    00045		          CWnd.Timer();
    00046		          //Destroy();
    00047		          //return;
    00048		        }
    00049		      }
    00050		  }
    00051	  }
    00052
    00053	  r = Frand();
    00054
    00055	  if (index==0)
    00056	  {
    00057	    SetTimer(0.1,false);
    00058	    index++;
    00059	    Emitters[0].SpawnParticle(1);
    00060	  }
    00061	  else if (index<18)
    00062	  {
    00063	    if (lastType == 0)
    00064	      r -= 0.25f;
    00065	    else
    00066	      r += 0.25f;
    00067
    00068	    if (r < 0.5)
    00069	    {
    00070	      SetTimer(0.1,false);
    00071	      index++;
    00072	  	  Emitters[0].SpawnParticle(1);
    00073	  	  lastType = 0;
    00074		  }
    00075		  else
    00076		  {
    00077	      SetTimer(0.1,false);
    00078	      index++;
    00079	  	  Emitters[1].SpawnParticle(1);
    00080	  	  lastType = 1;
    00081		  }
    00082	  }
    00083	  else
    00084	  {
    00085		destroy();
    00086		}
    00087	}
    00088	event timer2()
    00089	{
    00090		destroy();
    00091	}
    00092
    00093
    00094
    00095	defaultproperties
    00096	{
    00097	     Begin Object Class=SpriteEmitter Name=XIIIChuteEmiterA
    00098	         ProjectionNormal=(Y=1.000000,Z=0.000000)
    00099	         UseColorScale=True
    00100	         RespawnDeadParticles=False
    00101	         UseSizeScale=True
    00102	         UseRegularSizeScale=False
    00103	         UniformSize=False
    00104	         AutomaticInitialSpawning=False
    00105	         Initialized=True
    00106	         ColorScale(0)=(Color=(B=198,G=255,R=255))
    00107	         ColorScale(1)=(relativetime=0.500000,Color=(R=255))
    00108	         ColorScale(2)=(relativetime=1.000000,Color=(B=187,G=187,R=255))
    00109	         MaxParticles=5
    00110	         StartLocationRange=(X=(Min=-50.000000,Max=-50.000000),Y=(Min=-34.000000,Max=34.000000),Z=(Min=50.000000,Max=78.000000))
    00111	         UseRotationFrom=PTRS_Actor
    00112	         SizeScale(0)=(RelativeSize=1.000000)
    00113	         SizeScale(1)=(relativetime=0.500000,RelativeSize=0.100000)
    00114	         SizeScale(2)=(relativetime=1.000000,RelativeSize=0.100000)
    00115	         StartSizeRange=(X=(Min=40.000000,Max=40.000000),Y=(Min=50.000000,Max=50.000000),Z=(Min=50.000000,Max=50.000000))
    00116	         InitialParticlesPerSecond=0.000100
    00117	         DrawStyle=PTDS_AlphaBlend
    00118	         Texture=Texture'XIIIMenu.SFX.ALetterM'
    00119	         LifetimeRange=(Min=1.000000,Max=1.000000)
    00120	         Name="XIIIChuteEmiterA"
    00121	     End Object
    00122	     Emitters(0)=SpriteEmitter'XIDPawn.XIIIChuteEmiter.XIIIChuteEmiterA'
    00123	     Begin Object Class=SpriteEmitter Name=XIIIChuteEmiterH
    00124	         ProjectionNormal=(Y=1.000000,Z=0.000000)
    00125	         UseColorScale=True
    00126	         RespawnDeadParticles=False
    00127	         UseSizeScale=True
    00128	         UseRegularSizeScale=False
    00129	         UniformSize=False
    00130	         AutomaticInitialSpawning=False
    00131	         Initialized=True
    00132	         ColorScale(0)=(Color=(B=198,G=255,R=255))
    00133	         ColorScale(1)=(relativetime=0.500000,Color=(R=255))
    00134	         ColorScale(2)=(relativetime=1.000000,Color=(B=187,G=187,R=255))
    00135	         MaxParticles=5
    00136	         StartLocationRange=(X=(Min=-50.000000,Max=-50.000000),Y=(Min=-34.000000,Max=34.000000),Z=(Min=50.000000,Max=78.000000))
    00137	         UseRotationFrom=PTRS_Actor
    00138	         SizeScale(0)=(RelativeSize=1.000000)
    00139	         SizeScale(1)=(relativetime=0.500000,RelativeSize=0.100000)
    00140	         SizeScale(2)=(relativetime=1.000000,RelativeSize=0.100000)
    00141	         StartSizeRange=(X=(Min=40.000000,Max=40.000000),Y=(Min=50.000000,Max=50.000000),Z=(Min=50.000000,Max=50.000000))
    00142	         InitialParticlesPerSecond=0.000100
    00143	         DrawStyle=PTDS_AlphaBlend
    00144	         Texture=Texture'XIIIMenu.SFX.HLetterM'
    00145	         LifetimeRange=(Min=1.000000,Max=1.000000)
    00146	         Name="XIIIChuteEmiterH"
    00147	     End Object
    00148	     Emitters(1)=SpriteEmitter'XIDPawn.XIIIChuteEmiter.XIIIChuteEmiterH'
    00149	     bActorLight=True
    00150	     bDynamicLight=True
    00151	     bDelayDisplay=True
    00152	     LightType=LT_Steady
    00153	     LightEffect=LE_TorchWaver
    00154	     LightBrightness=255
    00155	     LightHue=41
    00156	     LightSaturation=117
    00157	     LightRadius=50
    00158	}

End Source Code