Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 |
//============================================================================= // rocket. //============================================================================= class rocket extends Projectile; #exec MESH IMPORT MESH=RocketM ANIVFILE=Models\rocket_a.3d DATAFILE=Models\rocket_d.3d LODSTYLE=2 LODFRAME=3 #exec MESH LODPARAMS MESH=RocketM STRENGTH=0.2 #exec MESH ORIGIN MESH=RocketM X=0 Y=-240 Z=0 YAW=-64 #exec MESH SEQUENCE MESH=RocketM SEQ=All STARTFRAME=0 NUMFRAMES=6 #exec MESH SEQUENCE MESH=RocketM SEQ=Still STARTFRAME=0 NUMFRAMES=1 #exec MESH SEQUENCE MESH=RocketM SEQ=WingIn STARTFRAME=1 NUMFRAMES=1 #exec MESH SEQUENCE MESH=RocketM SEQ=Armed STARTFRAME=1 NUMFRAMES=3 #exec MESH SEQUENCE MESH=RocketM SEQ=SpinCCW STARTFRAME=4 NUMFRAMES=1 #exec MESH SEQUENCE MESH=RocketM SEQ=SpinCW STARTFRAME=5 NUMFRAMES=1 #exec TEXTURE IMPORT NAME=JRocket1 FILE=Models\rocket.pcx #exec OBJ LOAD FILE=Textures\fireeffect16.utx PACKAGE=UnrealShare.Effect16 #exec MESHMAP SCALE MESHMAP=rocketM X=0.5 Y=0.5 Z=1.0 YAW=128 #exec MESHMAP SETTEXTURE MESHMAP=rocketM NUM=1 TEXTURE=Jrocket1 TLOD=50 #exec AUDIO IMPORT FILE="Sounds\Eightbal\Ignite.wav" NAME="Ignite" GROUP="Eightball" #exec AUDIO IMPORT FILE="Sounds\Eightbal\grenflor.wav" NAME="GrenadeFloor" GROUP="Eightball" #exec AUDIO IMPORT FILE="Sounds\General\brufly1.wav" NAME="Brufly1" GROUP="General" var Actor Seeking; var float MagnitudeVel,Count,SmokeRate; var vector InitialDir; var bool bRing,bHitWater,bWaterStart; var int NumExtraRockets; simulated function PostBeginPlay() { Count = -0.1; if (Level.bHighDetailMode) SmokeRate = 0.035; else SmokeRate = 0.15; } simulated function Tick(float DeltaTime) { local SpriteSmokePuff b; if( bHitWater || Level.NetMode==NM_DedicatedServer ) { Disable('Tick'); Return; } Count += DeltaTime; if ( (Count>(SmokeRate+FRand()*(SmokeRate+NumExtraRockets*0.035))) ) { b = Spawn(class'SpriteSmokePuff'); b.RemoteRole = ROLE_None; if( Level.bDropDetail || (Level.TimeSeconds-LastRenderedTime)>1 ) Count= -0.5; // Reduce detail. else Count = 0; } } auto state Flying { simulated function ZoneChange( Zoneinfo NewZone ) { local waterring w; if (!NewZone.bWaterZone || bHitWater) Return; bHitWater = True; Disable('Tick'); if ( EffectIsRelevant(Location) ) { w = Spawn(class'WaterRing',,,,rot(16384,0,0)); w.DrawScale = 0.2; w.RemoteRole = ROLE_None; PlayAnim( 'Still', 3.0 ); } Velocity=0.6*Velocity; } simulated function ProcessTouch (Actor Other, Vector HitLocation) { if ((Other != instigator) && (Rocket(Other) == none)) Explode(HitLocation,Normal(HitLocation-Other.Location)); } function BlowUp(vector HitLocation, RingExplosion r) { if ( Level.Game.IsA('DeathMatchGame') ) //bigger damage radius HurtRadiusProj(0.9 * Damage,240.0, 'exploded', MomentumTransfer, HitLocation ); else HurtRadiusProj(Damage,200.0, 'exploded', MomentumTransfer, HitLocation ); MakeNoise(1.0); if ( r != None ) r.PlaySound(r.ExploSound,,6); } simulated function Explode(vector HitLocation, vector HitNormal) { local SpriteBallExplosion s; local RingExplosion3 r; s = spawn(class'SpriteBallExplosion',,,HitLocation + HitNormal*16); if ( RemoteRole!=ROLE_DumbProxy ) // 227: Make sure it's replicated on seeking rocket! s.RemoteRole = ROLE_None; if (bRing) r = Spawn(class'RingExplosion3',,,HitLocation + HitNormal*16,rotator(HitNormal)); BlowUp(HitLocation, r); Destroy(); } function BeginState() { initialDir = vector(Rotation); if ( Role == ROLE_Authority ) Velocity = speed*initialDir; Acceleration = initialDir*50; PlaySound(SpawnSound, SLOT_None, 2.3); PlayAnim( 'Armed', 0.2 ); if (Region.Zone.bWaterZone) { bHitWater = True; Velocity=0.6*Velocity; } } } defaultproperties { speed=900.000000 MaxSpeed=1600.000000 Damage=85.000000 MomentumTransfer=80000 MyDamageType="exploded" SpawnSound=Sound'UnrealShare.Eightball.Ignite' ImpactSound=Sound'UnrealShare.Eightball.GrenadeFloor' ExplosionDecal=Class'UnrealShare.BlastMark' RemoteRole=ROLE_SimulatedProxy LifeSpan=6.000000 AnimSequence="Armed" Skin=FireTexture'UnrealShare.Effect16.fireeffect16' Mesh=LodMesh'UnrealShare.RocketM' DrawScale=0.050000 AmbientGlow=96 bUnlit=True SoundRadius=9 SoundVolume=255 AmbientSound=Sound'UnrealShare.General.Brufly1' LightType=LT_Steady LightEffect=LE_NonIncidence LightBrightness=126 LightHue=28 LightSaturation=64 LightRadius=6 bCorona=True bBounce=True } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |