## XIDCine
Class MissileVaporEmitter

source: C:\XIII\XIDCine\Classes\MissileVaporEmitter.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Emitter
             |
             +--XIDCine.MissileVaporEmitter

Direct Known Subclasses:None

class MissileVaporEmitter
extends Engine.Emitter

    //                                             ba_adb      dP   dP  qb  db
    //========================================          'ba..ad      qa_ap

Variables
`VECTOR` | `InitialLocation`
`XIIIPlayerController` | `PC`
`Color` | `VEHue`
`float` | `VEMaxIntensity`
`float` | `VETime`

States
Effect, STA_Init

Function Summary
`void` | `PlayerFeedBack(XIIIPlayerController PCtrl, float MaxIntensity, Color Hue, float Time)`

State Effect Function Summary

State STA_Init Function Summary

Source Code

    00001
    00002	//    ========================================
    00003	//                                          by iKi ,ad¤¤b d¤¤b
    00004	//    dMP dMP .aMMMb  dMMMMb  .aMMMb  dMMMMb      ,I    qbP  qb
    00005	//   dMP dMP dMP"dMP dMP.dMP dMP"dMP dMP.dMP    aadP     qb   I
    00006	//  dMP dMP dMMMMMP dMMMMP" dMP dMP dMMMMK"    d      I  ²qb dP
    00007	//  YMvAP" dMP dMP dMP     dMP.aMP dMP"AMF    P      I     qbP
    00008	//   VP"  dMP dMP dMP      VMMMP" dMP dMP  EMITTER  pd      I²   d¤¤b
    00009	//                                             ba_adb      dP   dP  qb  db
    00010	//========================================          'ba..ad      qa_ap  ²P  a
    00011
    00012	class MissileVaporEmitter extends emitter;
    00013
    00014	VAR float VEMaxIntensity;
    00015	VAR Color VEHue;
    00016	VAR float VETime;
    00017	VAR XIIIPlayerController PC;
    00018	VAR VECTOR InitialLocation;
    00019
    00020	AUTO STATE STA_Init
    00021	{
    00022		EVENT BeginState( )
    00023		{
    00024			InitialLocation = Location;
    00025			SetCollision( true, false, false );
    00026			SetPhysics( PHYS_Projectile );
    00027			Velocity = 450*VECTOR(Rotation);
    00028		}
    00029
    00030		EVENT EndState( )
    00031		{
    00032			SetCollision( false, false, false );
    00033			InitialLocation = Location;
    00034		}
    00035
    00036		EVENT Tick( float dt )
    00037		{
    00038			LOCAL FLOAT f;
    00039
    00040			f = vSize( Location - InitialLocation );
    00041			Emitters[0].StartLocationOffset.X = -f;
    00042			Emitters[0].StartLocationOffset.Y = 24;
    00043			SetCollisionSize( 60*f/256, 40*f/256 ); // 50 - 40
    00044		}
    00045
    00046		EVENT Touch( Actor Other )
    00047		{
    00048			if ( Other.IsA('XIIIPlayerPawn') )
    00049			{
    00050				PC = XIIIPlayerController( Pawn(Other).Controller );
    00051				GotoState( 'Effect' );
    00052			}
    00053			else
    00054				if ( Other.IsA( 'MangousteSSH1Pawn' ) && Instigator!=Other )
    00055					MangousteSSH1Pawn(Other).MangousteController.VaporHurts( );
    00056		}
    00057	Begin:
    00058	//	sleep( 0.30 );
    00059
    00060	//	SetLocation( Location + 256*VECTOR(Rotation) );
    00061	//	Emitters[0].StartLocationOffset.X=-256; // SetLocation( Location + 256*VECTOR(Rotation) );
    00062		sleep( 1.00 );
    00063		Destroy();
    00064	}
    00065
    00066	FUNCTION PlayerFeedBack( XIIIPlayerController PCtrl, float MaxIntensity, Color Hue, float Time )
    00067	{
    00068		VEMaxIntensity = MaxIntensity;
    00069		VEHue = Hue;
    00070		VETime = Time;
    00071		PC = PCtrl;
    00072		GotoState( 'Effect' );
    00073	}
    00074
    00075	State Effect
    00076	{
    00077	Begin:
    00078	/*	if ( PC.bWeaponMode )
    00079		{
    00080			PC.OldWeap = PC.pawn.weapon.InventoryGroup;
    00081			PC.Pawn.Weapon.PutDown();
    00082		}
    00083		else
    00084		{
    00085			PC.OldItem = XIIIItems(PC.Pawn.SelectedItem);
    00086			PC.OldItem.PutDown();
    00087		}
    00088		PC.bWeaponBlock = true;
    00089	*/
    00090		LOG ("PC.Pawn.SpeedFactorLimit ="@PC.Pawn.SpeedFactorLimit );
    00091		PC.Pawn.SpeedFactorLimit = 0.50;
    00092		XIIIPawn(PC.Pawn).SetGroundSpeed( 1.0 );
    00093
    00094		Level.SetPoisonEffect( true, 0.25, VEMaxIntensity, VEHue );
    00095	//	Level.SetInjuredEffect( true, 0.01 );
    00096		sleep( 0.25);
    00097		Level.SetPoisonEffect( false, VETime, VEMaxIntensity, VEHue );
    00098	//	Level.SetInjuredEffect( false, VETime );
    00099
    00100		sleep( VETime );
    00101	/*
    00102		PC.bWeaponBlock = false;
    00103		if ( PC.bWeaponMode )
    00104		{
    00105			PC.Switchweapon( PC.OldWeap );
    00106			PC.Pawn.ChangedWeapon();
    00107		}
    00108		else
    00109		{
    00110			PC.cNextItem();
    00111			XIIIPawn(PC.Pawn).PendingItem = PC.OldItem;
    00112			PC.Pawn.ChangedWeapon();
    00113		}
    00114	*/
    00115		PC.Pawn.SpeedFactorLimit = 1.0;
    00116		XIIIPawn(PC.Pawn).SetGroundSpeed( 1.0 );
    00117		Destroy();
    00118	}
    00119
    00120	// 	AutoDestroy=true
    00121
    00122
    00123
    00124	defaultproperties
    00125	{
    00126	     VEMaxIntensity=0.100000
    00127	     VEHue=(B=160,G=255,R=255)
    00128	     VETime=1.500000
    00129	     Begin Object Class=SpriteEmitter Name=MissileVaporEmitterA
    00130	         UseColorScale=True
    00131	         FadeOut=True
    00132	         RespawnDeadParticles=False
    00133	         SpinParticles=True
    00134	         UseSizeScale=True
    00135	         UseRegularSizeScale=False
    00136	         AutomaticInitialSpawning=False
    00137	         Initialized=True
    00138	         ColorScale(0)=(Color=(B=84,G=133,R=130))
    00139	         ColorScale(1)=(relativetime=1.000000,Color=(B=50,G=80,R=79))
    00140	         FadeOutStartTime=0.850000
    00141	         MaxParticles=6
    00142	         UseRotationFrom=PTRS_Actor
    00143	         SpinsPerSecondRange=(X=(Min=-1.000000,Max=1.000000))
    00144	         SizeScale(0)=(RelativeSize=0.500000)
    00145	         SizeScale(1)=(relativetime=0.500000,RelativeSize=2.000000)
    00146	         SizeScale(2)=(relativetime=1.000000,RelativeSize=5.500000)
    00147	         StartSizeRange=(X=(Min=50.000000,Max=50.000000))
    00148	         InitialParticlesPerSecond=18.000000
    00149	         DrawStyle=PTDS_Brighten
    00150	         Texture=Texture'XIIICine.extinct_fumeeAD'
    00151	         SecondsBeforeInactive=10000.000000
    00152	         LifetimeRange=(Min=1.000000,Max=1.000000)
    00153	         StartVelocityRange=(X=(Min=700.000000,Max=700.000000))
    00154	         MaxAbsVelocity=(X=500.000000)
    00155	         VelocityLossRange=(X=(Min=1.000000,Max=1.000000))
    00156	         Name="MissileVaporEmitterA"
    00157	     End Object
    00158	     Emitters(0)=SpriteEmitter'XIDCine.MissileVaporEmitter.MissileVaporEmitterA'
    00159	     AutoDestroy=False
    00160	     CollisionRadius=1000.000000
    00161	     CollisionHeight=1000.000000
    00162	}

End Source Code