## XIDCine
Class HelicoRearRotor

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

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Decoration
             |
             +--XIDCine.HelicoRearRotor

Direct Known Subclasses:ApacheRearRotor, FBIHelicoRearRotor, NiceHelicoRearRotor

class HelicoRearRotor
extends Engine.Decoration

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

Variables
`float` | `Angle,RotationSpeed`
`bTurning,` | `bChanging`

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class HelicoRearRotor extends Decoration;
    00005
    00006	VAR bool bTurning, bChanging;
    00007	VAR float Angle,RotationSpeed;
    00008
    00009
    00010	EVENT PostBeginPlay()
    00011	{
    00012		if( (Owner!=none) && (Owner.bActorShadows) && (Shadow==None) )
    00013		{
    00014			Shadow = Spawn(class'ShadowProjector',Self,'',Location/*+vect(0,0,150)*/);
    00015			Shadow.ShadowScale = 4.4;
    00016			Shadow.MaxTraceDistance=2500;
    00017			Shadow.ShadowIntensity=64;
    00018	//		LOG ("SHADOW :"@Shadow);
    00019		}
    00020		if ( HelicoDeco(Owner)!=none && HelicoDeco(Owner).bInitiallyOn )
    00021		{
    00022			bTurning=true;
    00023			RotationSpeed=250000;
    00024		}
    00025
    00026		SetCollision(false,false,false);
    00027	}
    00028
    00029	EVENT Trigger(actor Other, Pawn EventInstigator)
    00030	{
    00031		bTurning=!bTurning;
    00032		bChanging=true;
    00033
    00034	}
    00035	//_____________________________________________________________________________
    00036	EVENT Tick( float dT )
    00037	{
    00038	    Local rotator R;
    00039
    00040		if (bChanging)
    00041		{
    00042			if (bTurning)
    00043			{
    00044				RotationSpeed+=0.25*250000*dt;
    00045				if (RotationSpeed>=250000)
    00046				{
    00047					RotationSpeed=250000;
    00048					bChanging=false;
    00049				}
    00050			}
    00051			else
    00052			{
    00053				RotationSpeed-=0.25*250000*dt;
    00054				if (RotationSpeed<=0)
    00055				{
    00056					RotationSpeed=0;
    00057					bChanging=false;
    00058				}
    00059			}
    00060		}
    00061		R=RelativeRotation;
    00062		Angle -= RotationSpeed*dT;
    00063		R.Roll = Angle;
    00064		R.Yaw = 0;
    00065		R.Pitch = 0;
    00066	    SetRelativeRotation( R );
    00067	}
    00068
    00069	EVENT Bump( actor Other)
    00070	{
    00071		if ( Other.IsA( 'XIIIPlayerPawn' ) && RotationSpeed>50000 )
    00072			Other.TakeDamage( 2000, none, Other.Location, vect(0,0,0), class'DTSuicided' );
    00073	}
    00074
    00075
    00076
    00077	defaultproperties
    00078	{
    00079	     bStatic=False
    00080	     bBlockZeroExtentTraces=False
    00081	     bBlockNonZeroExtentTraces=False
    00082	     DrawType=DT_StaticMesh
    00083	     StaticMesh=StaticMesh'Meshes_Vehicules.helicomangousteback'
    00084	}

End Source Code