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 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 |
//============================================================================= // ut_BioGel. //============================================================================= class UT_BioGel extends Projectile; #exec MESH IMPORT MESH=BioGelm ANIVFILE=..\unrealshare\MODELS\nGel_a.3D DATAFILE=..\unrealshare\MODELS\nGel_d.3D X=0 Y=0 Z=0 #exec MESH ORIGIN MESH=BioGelm X=-45 Y=0 Z=0 YAW=0 PITCH=-64 ROLL=0 #exec MESH SEQUENCE MESH=BioGelm SEQ=All STARTFRAME=0 NUMFRAMES=56 #exec MESH SEQUENCE MESH=BioGelm SEQ=Flying STARTFRAME=0 NUMFRAMES=13 #exec MESH SEQUENCE MESH=BioGelm SEQ=Still STARTFRAME=13 NUMFRAMES=1 #exec MESH SEQUENCE MESH=BioGelm SEQ=Hit STARTFRAME=14 NUMFRAMES=10 #exec MESH SEQUENCE MESH=BioGelm SEQ=Drip STARTFRAME=24 NUMFRAMES=13 #exec MESH SEQUENCE MESH=BioGelm SEQ=Slide STARTFRAME=37 NUMFRAMES=7 #exec MESH SEQUENCE MESH=BioGelm SEQ=Shrivel STARTFRAME=44 NUMFRAMES=12 #exec TEXTURE IMPORT NAME=Jgreen FILE=MODELS\green.PCX #exec MESHMAP SCALE MESHMAP=BioGelm X=0.04 Y=0.04 Z=0.08 #exec MESHMAP SETTEXTURE MESHMAP=BioGelm NUM=1 TEXTURE=Jgreen #exec MESH NOTIFY MESH=BioGelm SEQ=Drip TIME=0.6 FUNCTION=DropDrip #exec AUDIO IMPORT FILE="..\unrealshare\sounds\general\explg02.wav" NAME="Explg02" GROUP="General" #exec AUDIO IMPORT FILE="..\Unreali\Sounds\BRifle\GelHit1.WAV" NAME="GelHit" GROUP="BioRifle" var vector SurfaceNormal; var bool bOnGround; var bool bCheckedSurface; var int numBio; var float wallTime; var float BaseOffset; var BioFear MyFear; function PostBeginPlay() { SetTimer(3.0, false); Super.PostbeginPlay(); } function Destroyed() { if ( MyFear != None ) MyFear.Destroy(); Super.Destroyed(); } function Timer() { local ut_GreenGelPuff f; f = spawn(class'ut_GreenGelPuff',,,Location + SurfaceNormal*8); f.numBlobs = numBio; if ( numBio > 0 ) f.SurfaceNormal = SurfaceNormal; PlaySound (MiscSound,,3.0*DrawScale); if ( (Mover(Base) != None) && Mover(Base).bDamageTriggered ) Base.TakeDamage( Damage, instigator, Location, MomentumTransfer * Normal(Velocity), MyDamageType); HurtRadius(damage * Drawscale, FMin(250, DrawScale * 75), MyDamageType, MomentumTransfer * Drawscale, Location); Destroy(); } simulated function SetWall(vector HitNormal, Actor Wall) { local vector TraceNorm, TraceLoc, Extent; local actor HitActor; local rotator RandRot; SurfaceNormal = HitNormal; if ( Level.NetMode != NM_DedicatedServer ) spawn(class'BioMark',,,Location, rotator(SurfaceNormal)); RandRot = rotator(HitNormal); RandRot.Roll += 32768; SetRotation(RandRot); if ( Mover(Wall) != None ) SetBase(Wall); } singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, vector momentum, name damageType ) { if ( damageType == MyDamageType ) numBio = 3; GoToState('Exploding'); } auto state Flying { function ProcessTouch (Actor Other, vector HitLocation) { if ( Pawn(Other)!=Instigator || bOnGround) Global.Timer(); } simulated function HitWall( vector HitNormal, actor Wall ) { SetPhysics(PHYS_None); MakeNoise(0.3); bOnGround = True; PlaySound(ImpactSound); SetWall(HitNormal, Wall); PlayAnim('Hit'); GoToState('OnSurface'); } simulated function ZoneChange( Zoneinfo NewZone ) { local waterring w; if (!NewZone.bWaterZone) Return; if (!bOnGround) { w = Spawn(class'WaterRing',,,,rot(16384,0,0)); w.DrawScale = 0.1; } bOnGround = True; Velocity=0.1*Velocity; } function Timer() { GotoState('Exploding'); } function BeginState() { if ( Role == ROLE_Authority ) { Velocity = Vector(Rotation) * Speed; Velocity.z += 120; if( Region.zone.bWaterZone ) Velocity=Velocity*0.7; } if ( Level.NetMode != NM_DedicatedServer ) RandSpin(100000); LoopAnim('Flying',0.4); bOnGround=False; PlaySound(SpawnSound); } } state Exploding { ignores Touch, TakeDamage; function BeginState() { SetTimer(0.1+FRand()*0.2, False); } } state OnSurface { function ProcessTouch (Actor Other, vector HitLocation) { GotoState('Exploding'); } simulated function CheckSurface() { local float DotProduct; DotProduct = SurfaceNormal dot vect(0,0,-1); If( DotProduct > 0.7 ) PlayAnim('Drip',0.1); else if (DotProduct > -0.5) PlayAnim('Slide',0.2); } function Timer() { if ( Mover(Base) != None ) { WallTime -= 0.2; if ( WallTime < 0.15 ) Global.Timer(); else if ( VSize(Location - Base.Location) > BaseOffset + 4 ) Global.Timer(); } else Global.Timer(); } function BeginState() { wallTime = 3.8; MyFear = Spawn(class'BioFear'); if ( Mover(Base) != None ) { BaseOffset = VSize(Location - Base.Location); SetTimer(0.2, true); } else SetTimer(wallTime, false); } simulated function AnimEnd() { if ( !bCheckedSurface && (DrawScale > 1.0) ) CheckSurface(); bCheckedSurface = true; } } defaultproperties { numBio=9 speed=840.000000 MaxSpeed=1500.000000 Damage=20.000000 MomentumTransfer=20000 MyDamageType=Corroded ImpactSound=Sound'Botpack.BioRifle.GelHit' MiscSound=Sound'UnrealShare.General.Explg02' bNetTemporary=False Physics=PHYS_Falling RemoteRole=ROLE_SimulatedProxy LifeSpan=12.000000 AnimSequence=Flying Style=STY_Translucent Texture=Texture'Botpack.Jgreen' Mesh=LodMesh'Botpack.BioGelm' DrawScale=2.000000 AmbientGlow=255 bUnlit=True bMeshEnviroMap=True CollisionRadius=2.000000 CollisionHeight=2.000000 bProjTarget=True LightType=LT_Steady LightEffect=LE_NonIncidence LightBrightness=100 LightHue=91 LightRadius=3 bBounce=True Buoyancy=170.000000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |