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 |
//============================================================================= // MarineBox. //============================================================================= class MarineBox expands SteelBox; #forceexec MESH IMPORT MESH=dropbox ANIVFILE=MODELS\CARGO\dropbox_a.3d DATAFILE=MODELS\CARGO\dropbox_d.3d X=0 Y=0 Z=0 #forceexec MESH ORIGIN MESH=dropbox X=0 Y=00 Z=000 #forceexec MESH SEQUENCE MESH=dropbox SEQ=All STARTFRAME=0 NUMFRAMES=1 #forceexec MESH SEQUENCE MESH=dropbox SEQ=DROPBOX STARTFRAME=0 NUMFRAMES=1 #forceexec TEXTURE IMPORT NAME=Jdropbox1 FILE=MODELS\CARGO\dropbox.PCX GROUP=Skins FLAGS=2 // mat1 #forceexec MESHMAP NEW MESHMAP=dropbox MESH=dropbox #forceexec MESHMAP SCALE MESHMAP=dropbox X=1.05 Y=1.05 Z=2.625 #forceexec MESHMAP SETTEXTURE MESHMAP=dropbox NUM=1 TEXTURE=Jdropbox1 /*#exec MESH IMPORT MESH=UMSbox ANIVFILE=MODELS\CARGO\UMSbox_a.3d DATAFILE=MODELS\CARGO\UMSbox_d.3d X=0 Y=0 Z=0 #exec MESH ORIGIN MESH=UMSbox X=90 Y=-50 Z=200 #exec MESH SEQUENCE MESH=UMSbox SEQ=All STARTFRAME=0 NUMFRAMES=1 #exec MESH SEQUENCE MESH=UMSbox SEQ=UMSBOX STARTFRAME=0 NUMFRAMES=1 #forceexec TEXTURE IMPORT NAME=Jdropbox1 FILE=MODELS\DROPBOX\dropbox.PCX GROUP=Skins FLAGS=2 // mat1 #exec MESHMAP NEW MESHMAP=UMSbox MESH=UMSbox #exec MESHMAP SCALE MESHMAP=UMSbox X=0.1 Y=0.1 Z=0.2 #exec MESHMAP SETTEXTURE MESHMAP=UMSbox NUM=1 TEXTURE=JUMSbox1*/ var bool bChainedExplosion, bDestroy; var class<Inventory> ContentArray[ 3 ]; var() int Health; function PostBeginPlay() { if( Health == 0 ) { Health = 30; } if( Contents != none ) { ContentArray[ 0 ] = Contents; } if( Content2 != none ) { ContentArray[ 1 ] = Content2; } if( Content3 != none ) { ContentArray[ 2 ] = Content3; } } auto state active { function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType) { Instigator = InstigatedBy; if (Health<0) Return; if ( Instigator != None ) MakeNoise(1.0); bBobbing = false; Health -= NDamage; if (Health <0) { skinnedFrag( class'UMSFragment', texture'JDropBox1', Vect( 2000, 0, 0 ), 1.0, 7 ); Destroy(); } else { SetPhysics(PHYS_Falling); Momentum.Z = 1000; Velocity=Momentum*0.016; } } Begin: } // jc: override Destroyed function to allow for multiple crate contents (and give them velocity) function Destroyed() { local actor dropped, A; local class<actor> tempClass; local int Incrementer; if( (Pawn(Base) != None) && (Pawn(Base).CarriedDecoration == self) ) Pawn(Base).DropDecoration(); if( Contents != none && !Level.bStartup ) { for( Incrementer = 0; Incrementer <= 2; Incrementer++ ) { if( ContentArray[ Incrementer ] != none ) { dropped = Spawn( ContentArray[ Incrementer ] ); dropped.RemoteRole = ROLE_DumbProxy; dropped.SetPhysics( PHYS_Falling ); Dropped.Velocity = VRand()*(75+FRand()*150.0+100.0 + (250)/80); dropped.bCollideWorld = true; if( Inventory( Dropped ) != none ) { Inventory( Dropped ).GotoState( 'Pickup', 'Dropped' ); } } else { break; } } } if( Event != '' ) foreach AllActors( class 'Actor', A, Event ) A.Trigger( Self, None ); // Super.Destroyed(); } defaultproperties { Health=30 Mesh=LodMesh'UPak.dropbox' CollisionRadius=51.000000 CollisionHeight=50.000000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |