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 |
//============================================================================= // SludgeBarrel. //============================================================================= class SludgeBarrel extends Decoration; #exec AUDIO IMPORT FILE="..\UnrealShare\sounds\general\bPush1.wav" NAME="ObjectPush" GROUP="General" #exec AUDIO IMPORT FILE="..\UnrealShare\sounds\general\EndPush.wav" NAME="Endpush" GROUP="General" #exec MESH IMPORT MESH=sbarrel ANIVFILE=MODELS\oilbar_a.3D DATAFILE=MODELS\oilbar_d.3D X=0 Y=0 Z=0 #exec MESH ORIGIN MESH=sbarrel X=0 Y=0 Z=-190 YAW=0 #exec MESH SEQUENCE MESH=sbarrel SEQ=All STARTFRAME=0 NUMFRAMES=21 #exec MESH SEQUENCE MESH=sbarrel SEQ=Swirl STARTFRAME=0 NUMFRAMES=21 #exec TEXTURE IMPORT NAME=Jsbarrel1 FILE=MODELS\oilbarel.PCX GROUP="Skins" #exec MESHMAP SCALE MESHMAP=sbarrel X=0.05 Y=0.05 Z=0.1 #exec MESHMAP SETTEXTURE MESHMAP=sbarrel NUM=1 TEXTURE=Jsbarrel1 var() int Health; var name DamageTypeb; Auto State Animate { singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType) { DamageTypeb = DamageType; Instigator = InstigatedBy; if (Health<0) Return; if ( Instigator != None ) MakeNoise(1.0); Health -= NDamage; if (Health <0) GoToState('exploding'); else { SetPhysics(PHYS_Falling); bBounce = True; Momentum.Z = 1000; Velocity=Momentum*0.01; } } Begin: LoopAnim('swirl',0.4); } state exploding { function Timer() { local int i; local BarrelSludge b; HurtRadius(200, 100, 'burned', 0, Location); SetCollision(False,False,False); for (i=0 ; i<int(FRand()*5+1) ; i++) { b = Spawn( class 'BarrelSludge',, '', Location + (vect(0,0,1.2)+VRand())*(70+FRand()*50)); if ( b != None ) b.DrawScale = FRand()+1.2; } Spawn(Class 'GreenSmokePuff'); if (DamageTypeb == 'burned') skinnedFrag(class'Fragment1', texture'jSBarrel1', Vect(0,0,30000),1.0, 4); else skinnedFrag(class'Fragment1', texture'jSBarrel1', Vect(0,0,30000),1.0, 12); Destroy(); } Begin: if (DamageTypeb != 'burned') Timer(); else SetTimer(FRand()*0.4+0.1,False); } defaultproperties { Health=2 bPushable=True PushSound=Sound'UnrealI.General.ObjectPush' EndPushSound=Sound'UnrealI.General.Endpush' bStatic=False DrawType=DT_Mesh Mesh=LodMesh'UnrealI.sbarrel' AmbientGlow=96 CollisionRadius=17.000000 CollisionHeight=26.299999 bCollideActors=True bCollideWorld=True bBlockActors=True bBlockPlayers=True LightType=LT_Steady LightEffect=LE_TorchWaver LightBrightness=64 LightHue=88 LightRadius=10 Mass=100.000000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |