Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UT2k4AssaultFull.FX_Turret_IonCannon_FireEffect


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
//=============================================================================
// FX_Turret_IonCannon_FireEffect
//=============================================================================
// Created by Laurent Delayen
// © 2003, Epic Games, Inc.  All Rights Reserved
//=============================================================================

class FX_Turret_IonCannon_FireEffect extends Actor;

#exec OBJ LOAD FILE=XEffectMat.utx

var Vector          HitLocation, HitNormal;
var FX_NewIonCore       IonCore;
var FX_NewIonPlasmaBeam BeamEffect;

var     float StartTime;
var()   float DropTime;

replication
{
    reliable if (bNetInitial && Role == ROLE_Authority)
        HitLocation, HitNormal;
}

function AimAt(Vector hl, Vector hn)
{
    HitLocation = hl;
    HitNormal = hn;
    if ( Level.NetMode != NM_DedicatedServer )
        SpawnEffects();
}

simulated function PostNetBeginPlay()
{
    if ( Role < ROLE_Authority )
        SpawnEffects();
}

simulated function SpawnEffects()
{
    local Rotator   R;

    R = Rotator( HitLocation - Location );
    SetRotation( R );
    BeamEffect = Spawn(class'FX_NewIonPlasmaBeam',,, Location, Rotation);
    IonCore = Spawn(class'FX_NewIonCore',,, Location, Rotation);

    GotoState('Drop');
}

state Drop
{
    simulated function BeginState()
    {
        StartTime = Level.TimeSeconds;
        SetTimer(DropTime, false);
    }

    simulated function Tick(float dt)
    {
        local float Delta;
        Delta = FMin((Level.TimeSeconds - StartTime) / DropTime, 1.0);
        
        IonCore.SetLocation( Location*(1.0-delta) + HitLocation*delta );
        BeamEmitter(BeamEffect.Emitters[0]).BeamDistanceRange.Max = VSize( Location - HitLocation ) * Delta;
        BeamEmitter(BeamEffect.Emitters[0]).BeamDistanceRange.Min = BeamEmitter(BeamEffect.Emitters[0]).BeamDistanceRange.Max;
    }

    simulated function Timer()
    {
        local Actor A;

        BeamEmitter(BeamEffect.Emitters[0]).BeamDistanceRange.Max = VSize( Location - HitLocation );
        BeamEmitter(BeamEffect.Emitters[0]).BeamDistanceRange.Min = BeamEmitter(BeamEffect.Emitters[0]).BeamDistanceRange.Max;

        IonCore.Kill();

        A = Spawn(class'FX_Turret_IonCannon_BeamExplosion',,, HitLocation+HitNormal*32, Rotator(HitNormal) );
        A.RemoteRole = ROLE_None;
        GotoState('');
    }
}

defaultproperties
{
     DropTime=0.500000
     LightType=LT_Steady
     LightEffect=LE_QuadraticNonIncidence
     LightHue=160
     LightSaturation=140
     LightBrightness=255.000000
     LightRadius=12.000000
     DrawType=DT_None
     bDynamicLight=True
     bNetTemporary=True
     bAlwaysRelevant=True
     bReplicateMovement=False
     bSkipActorPropertyReplication=True
     RemoteRole=ROLE_SimulatedProxy
     LifeSpan=2.000000
     TransientSoundVolume=1.000000
     TransientSoundRadius=5000.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mon 23/10/2006 20:40:04.000 - Creation time: Wed 7/2/2007 19:16:40.000 - Created with UnCodeX