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 00241 00242 00243 00244 00245 00246 00247 00248 00249 |
//============================================================================= // xEmitter - particle emission! renamed to avoid conflict with Emitter // Copyright 2001 Digital Extremes - All Rights Reserved. // Confidential. //============================================================================= class xEmitter extends Actor native placeable; #exec Texture Import File=Textures\S_Emitter.tga Name=S_Emitter Mips=Off replication { unreliable if (Role == ROLE_Authority) mSpawnVecA, blockOnNet; } // particle system config... var(PclEmitter) enum ExParticleTypes { PT_Sprite, PT_Stream, PT_Line, PT_Disc, PT_Mesh, PT_Branch, PT_Beam, } mParticleType; // particle system config... var(PclEmitter) enum ExSpawningTypes { ST_Sphere, ST_Line, ST_Disc, ST_Cylinder, ST_AimedSphere, ST_StaticMesh, ST_Explode, ST_ExplodeRing, ST_OwnerSkeleton, ST_Test, } mSpawningType; var(PclEmitter) bool mRegen; var(PclEmitter) bool mRegenPause; var(PclEmitter) float mRegenOnTime[2]; var(PclEmitter) float mRegenOffTime[2]; var(PclEmitter) int mStartParticles; // at runtime also, you can set this > 0 to spawn this many next tick var(PclEmitter) private int mMaxParticles; var(PclEmitter) float mDelayRange[2]; var(PclEmitter) float mLifeRange[2]; var(PclEmitter) float mRegenRange[2]; var(PclEmitter) float mRegenDist; var(PclEmitter) Name mSourceActor; var(PclEmitter) Name mChildName; var xEmitter mChildEmitter; var(PclEmitter) StaticMeshActor SourceStaticMesh; var(PclEmitter) bool bSuspendWhenNotVisible; var(PclVisuals) bool mDistanceAtten; var(PclMovement) vector mDirDev; var(PclMovement) vector mPosDev; var(PclMovement) vector mSpawnVecA; var(PclMovement) vector mSpawnVecB; var(PclMovement) float mSpeedRange[2]; var(PclMovement) bool mPosRelative; var(PclMovement) float mMassRange[2]; var(PclMovement) float mAirResistance; var(PclMovement) bool mCollision; var(PclMovement) float mOwnerVelocityFactor; var(PclVisuals) bool mRandOrient; var(PclMovement) float mSpinRange[2]; var(PclVisuals) float mSizeRange[2]; var(PclVisuals) float mGrowthRate; var(PclVisuals) color mColorRange[2]; // attenuation var(PclVisuals) bool mAttenuate; var(PclVisuals) float mAttenKa; var(PclVisuals) float mAttenKb; var(PclVisuals) enum EAttenFunc { ATF_LerpInOut, ATF_ExpInOut, ATF_SmoothStep, ATF_Pulse, ATF_Random, ATF_None, } mAttenFunc; var int mpAttenFunc; var(PclVisuals) bool mRandTextures; // choose a random texture for each instance of this emitter var(PclVisuals) bool mTileAnimation; // animate the particle from the set of tiles throughout life var(PclVisuals) int mNumTileColumns; var(PclVisuals) int mNumTileRows; var(PclVisuals) bool mUseMeshNodes; var(PclVisuals) bool mRandMeshes; var(PclVisuals) StaticMesh mMeshNodes[8]; // if using meshes as particle nodes var(PclVisuals) Texture mPosColorMapXY; var(PclVisuals) Texture mPosColorMapXZ; var(PclVisuals) Texture mLifeColorMap; var(PclSoftBody) float springK; var(PclSoftBody) float springD; var(PclSoftBody) float springMaxStretch; var(PclSoftBody) float springMaxCompress; // ver 1.1 var(PclMovement) float mColElasticity; // bounciness of particle collision 0-1 var(PclMovement) float mAttraction; // attractive force between particles var(PclMovement) bool mColMakeSound; var(pclBeam) float mWaveFrequency; var(pclBeam) float mWaveAmplitude; var(pclBeam) float mWaveShift; var(pclBeam) float mBendStrength; var(pclBeam) bool mWaveLockEnd; var(Force) bool bForceAffected; // native stuff. var transient int SystemHandle; var transient int Expire; var transient pointer mpParticles; // ptr to tarray var transient int mNumActivePcl; var transient pointer mpIterator; var transient int mbSpinningNodes; var transient vector mLastPos; var transient vector mLastVector; var transient float mTime; var transient float mT; // delta var transient float mRegenBias; var transient float mRegenTimer; var transient float mPauseTimer; var transient Box mBounds; var transient plane mSphere; var transient vector mDir; var transient int mNumUpdates; var transient int mAtLeastOneFrame; var transient int mRenderableVerts; var transient float mTexU; var transient float mTexV; var transient float mTotalTiles; var transient float mInvTileCols; var transient pointer mpSprings; // ptr to Spring class var transient int mNumSprings; var transient float mWavePhaseA; var transient float mWavePhaseB; var bool blockOnNet; var bool bCallPreSpawn; // v 1.4 var transient int mHeadIndex; event CollisionSound(); //amb event PreSpawned() { if ( !Level.bStartup ) { bSuspendWhenNotVisible = false; if ( Level.bDropDetail && (mMaxParticles > 5) && ((mParticleType == PT_Sprite) || (mParticleType == PT_Mesh) || (mParticleType == PT_Line)) ) { mMaxParticles = mMaxParticles * 0.65; mRegenRange[0] *= 0.8; mRegenRange[1] *= 0.8; mStartParticles = 0.65 * mStartParticles; } } } simulated final function float ClampToMaxParticles(float InPart) { return FMin(InPart, mStartParticles); } event Trigger( Actor Other, Pawn EventInstigator ) { mRegenPause = !mRegenPause; } simulated function UpdatePrecacheMaterials() { if ( mPosColorMapXY != None ) Level.AddPrecacheMaterial(mPosColorMapXY); if ( mPosColorMapXZ != None ) Level.AddPrecacheMaterial(mPosColorMapXZ); if ( mLifeColorMap != None ) Level.AddPrecacheMaterial(mLifeColorMap); super.UpdatePrecacheMaterials(); } static function PrecacheContent(LevelInfo Level) { if ( Default.mPosColorMapXY != None ) Level.AddPrecacheMaterial(Default.mPosColorMapXY); if ( Default.mPosColorMapXZ != None ) Level.AddPrecacheMaterial(Default.mPosColorMapXZ); if ( Default.mLifeColorMap != None ) Level.AddPrecacheMaterial(Default.mLifeColorMap); if ( Default.Skins.Length > 0 ) Level.AddPrecacheMaterial(Default.Skins[0]); } defaultproperties { mRegen=Wahr mStartParticles=1 mMaxParticles=50 mLifeRange(0)=4.000000 mLifeRange(1)=4.000000 mRegenRange(0)=1.000000 mRegenRange(1)=1.000000 bSuspendWhenNotVisible=Wahr mSpawnVecB=(Z=0.050000) mSpeedRange(0)=40.000000 mSpeedRange(1)=40.000000 mAirResistance=0.400000 mSizeRange(0)=10.000000 mSizeRange(1)=10.000000 mColorRange(0)=(B=255,G=255,R=255,A=255) mColorRange(1)=(B=255,G=255,R=255,A=255) mAttenuate=Wahr mAttenKa=0.200000 mAttenKb=1.000000 mNumTileColumns=1 mNumTileRows=1 mColElasticity=0.500000 bCallPreSpawn=Wahr LightEffect=LE_QuadraticNonIncidence DrawType=DT_Particle bAcceptsProjectors=Falsch bNetTemporary=Wahr RemoteRole=ROLE_None Texture=Texture'Engine.S_Emitter' Skins(0)=Texture'Engine.S_Emitter' bUnlit=Wahr bGameRelevant=Wahr CollisionRadius=0.000000 CollisionHeight=0.000000 bNotOnDedServer=Wahr bDirectional=Wahr } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |