// Common rain particle effect // Virtual system which holds parameters for drips that hit surface // Note: not all parameters can be assigned to a particle, many are system-global (e.g. m_fFrameRate) // Warning: you can cause it to shut down like any other system (by combination of flags, frames, color, etc.) virtual inactive CPSCustom DripSplashSystem { //"fParticleScaleMin" "0.0625" "fParticleScaleMin" "0.125" "fParticleScaleMax" "0.25" "iParticleFlags" "0" "iTraceFlags" "8" "iMaxParticles" "0"// This will disable the system so it won't consume computing resources "fParticleSpeedMin" "0.0" "fParticleSpeedMax" "0.0" "fParticleWeight" "0.0" "iStartType" "0"// PSSTARTTYPE_POINT = 0, "iMovementType" "0" "vDirection" "0 0 0" "fScale" "1.0" "fScaleDelta" "0.25" "fFrameRate" "24" "Color4b" "255 255 255 191" "ColorMax4b" "255 255 255 255" "ColorDelta4f" "0.0 0.0 0.0 -0.1" "iRenderMode" "5" "iDrawContents" "0" "iDoubleSided" "0" "iFlags" "1296"// 16+256+1024 "iFollowFlags" "64" "iFollowAttachment" "65535" "szTexture" "sprites/wsplash3.spr" } // Water circles virtual inactive CPSCustom DripCircleSystem { "iMaxParticles" "0" "fParticleSpeedMin" "0.0" "fParticleSpeedMax" "0.0" "fParticleWeight" "0.0" "iStartType" "0" "iMovementType" "0" "vDirection" "0 0 1" "fScale" "0.125" "fScaleDelta" "40.0" "fFrameRate" "0" "Color4b" "255 255 255 191" "ColorMax4b" "255 255 255 255" "ColorDelta4f" "0.0 0.0 0.0 -0.75" "iDoubleSided" "1" "iFlags" "1304"// 8+16+256+1024 "iFollowFlags" "64" "iFollowAttachment" "65535" "szTexture" "sprites/rain_s.spr" } // The main emitting system CPSCustom DripSystem { // Brush contents in which particles cannot exist. Calculate as follows: m_iDrawContents |= (1 << abs(CONTENTS_WATER)); //"iDestroyContents" "0" // Particle start scale range //"fParticleScaleMin" "0.0625" //"fParticleScaleMax" "0.125" "fParticleScaleMin" "0.125" "fParticleScaleMax" "0.25" // If defined, particles start randomly inside this sphere relatively to host entity origin "fStartRadiusMin" "0" "fStartRadiusMax" "0" // If defined (and no radius), particles start randomly inside this box relatively to host entity origin //"vStartMins" "-4096 -4096 256" //"vStartMaxs" "4096 4096 1536" // Spread vector (for directed movement) "vSpread" "0 0 0" // Destination point (absolute coordinates) // vDestination "0 0 0" // Acceleration range //"vAccelMin" "0 0 0" //"vAccelMax" "0 0 0" // Particle velocity.x = vDirection.x*RANDOM_FLOAT(fParticleSpeedMin, fParticleSpeedMax) + vSinVel.x*sin(t+i) + vCosVel.x*cos(t+i); "vSinVel" "0 0 0" "vCosVel" "0 0 0" // Particle acceleration.x += vSinAccel.x*sin(t+i) + vCosAccel.x*cos(t+i); //"vSinAccel" "4 0 0" //"vCosAccel" "0 4 0" // Custom Particle flags // PSCUSTOM_PFLAG_ORIENTED_START 1 // PSCUSTOM_PFLAG_ORIENTED_HIT_SURFACE 2 // PSCUSTOM_PFLAG_ORIENTED_HIT_LIQUID 4 // PSCUSTOM_PFLAG_LOOPFRAMES_HIT_SURFACE 8 // PSCUSTOM_PFLAG_LOOPFRAMES_HIT_LIQUID 16 // PSCUSTOM_PFLAG_HIT_FADEOUT 32 "iParticleFlags" "4" // Trace flags (defines clipping behavior), 0 is the slowest option. // PM_STUDIO_IGNORE 1// Skip studio models (faster) // PM_STUDIO_BOX 2// Use boxes for non-complex studio models (even in traceline) (faster) // PM_GLASS_IGNORE 4// Ignore entities with non-normal rendermode // PM_WORLD_ONLY 8// Only trace against the world (fastest) "iTraceFlags" "9" // Number of particles this system can allocate. "0" will disable the system and make it virtual so it can be used in another systems. "iMaxParticles" "2048" // Emission rate, particles per second. "0" will make the system try to calculate it automatically (not always reliable). "iEmitRate" "0" // Linear speed range "fParticleSpeedMin" "128.0" "fParticleSpeedMax" "160.0" // Weight for physics, gravity "fParticleWeight" "1.0" // Size (radius) of particle's collision volume "fParticleCollisionSize" "1.0" // Right now only used for automatic calculation of emission rate //"fParticleLife" "1.0" // Particle start type: // PSSTARTTYPE_POINT = 0, // PSSTARTTYPE_SPHERE, // PSSTARTTYPE_BOX, // PSSTARTTYPE_LINE, // PSSTARTTYPE_ENTITYBBOX, // PSSTARTTYPE_CYLINDER "iStartType" "4" // Particle movement type: // PSMOVTYPE_DIRECTED = 0, // PSMOVTYPE_OUTWARDS,// explosion // PSMOVTYPE_INWARDS,// implosion // PSMOVTYPE_RANDOM "iMovementType" "0" // Direction for movement type 0 (should be normalized i.e. have length of 1.0) "vDirection" "0 0 -1" // Overrides internal value. With (0,0,0) bounding box coordinates become absolute. << IMPORTANT "vOrigin" "0 0 0" // System velocity (ignored because system moves with its host entity) //"vVelocity" "0 0 0" // Useless for now //"vAngles" "0 0 0" // Added every frame //"anglesdelta" // Offset from host entity origin (rotated according to entity orientation) "vOffset" "0 0 0" // Relative scale "fScale" "1.0" // Added every frame "fScaleDelta" "0.0" // Starting frame (useful with frame rate 0) "fFrame" "0" // Can be 0 to use specific frame of a sprite "fFrameRate" "20" // Initial color (range minimum) "Color4b" "255 255 255 191" // Initial color (range maximum) Particle color = RANDOM(Color4b, ColorMax4b) "ColorMax4b" "255 255 255 255" // Added every frame "ColorDelta4f" "0.0 0.0 0.0 0.0" // Non-particle System or Particle dimensions (see also flag ABSOLUTESIZE) //"fSizeX" "0" //"fSizeY" "0" // Bounce, if collisions are enabled (velocity *= fBounceFactor) or move along surface if "-1". "fBounceFactor" "0" // Friction, used only when m_fBounceFactor == -1 "fFriction" "0" // Standard HL render mode "iRenderMode" "5" // Standard HL render fx (unused) //"rendereffects" "0" // Brush contents in which particles can exist. Calculate as follows: m_iDrawContents |= (1 << abs(CONTENTS_WATER)); "iDrawContents" "0" // If true, faces are drawn double-sided "iDoubleSided" "0" // System will be active and drawn if cl_particles >= iFxLevel "iFxLevel" "1" // System flags (sum of all desired flags) // RENDERSYSTEM_FLAG_RANDOMFRAME 1 // random frame sequence // RENDERSYSTEM_FLAG_CLIPREMOVE 2 // remove upon touching architecture // RENDERSYSTEM_FLAG_NOCLIP 4 // persist inside architecture // RENDERSYSTEM_FLAG_LOOPFRAMES 8 // don't remove after displaying last frame (when no life time set) // RENDERSYSTEM_FLAG_ADDPHYSICS 16 // interact with world (bounce upon collisions, etc.) // RENDERSYSTEM_FLAG_DRAWALWAYS 32 // ignore visibility checks (draw behind walls, outside visible area) // RENDERSYSTEM_FLAG_HARDSHUTDOWN 64 // don't wait/fade, remove instantly // RENDERSYSTEM_FLAG_SIMULTANEOUS 128 // emit all particles at start // RENDERSYSTEM_FLAG_ADDGRAVITY 256 // add world gravity to system acceleration // RENDERSYSTEM_FLAG_ZROTATION 512 // rotate around Z axis only (when parallel to viewport) // RENDERSYSTEM_FLAG_NODRAW 1024// don't draw (but still update normally) // RENDERSYSTEM_FLAG_ABSOLUTESIZE 2048// don't take size from texture // RENDERSYSTEM_FLAG_STARTRANDOMFRAME 4096// start at random frame, continue according to other settings // RENDERSYSTEM_FLAG_UPDATEOUTSIDEPVS 8192// update even when system or emitter is outside PVS // 8+16+256+512 // env_rain: z-rotation was previously set manually via entity flag "iFlags" "792" // CRenderSystem follow flags (sum of all desired flags), ICNF == "if cannot follow" // RENDERSYSTEM_FFLAG_ICNF_KEEPSEARCHING 0// default: keep searching // RENDERSYSTEM_FFLAG_ICNF_REMOVE 1// remove if can not find entity // RENDERSYSTEM_FFLAG_ICNF_STAYANDFORGET 2// stop copying origin and just stay at last coordinates // RENDERSYSTEM_FFLAG_ICNF_NODRAW 4// hide if can not find entity // RENDERSYSTEM_FFLAG_CLIPREMOVE 8// remove upon touching architecture (even if entity still exists) // RENDERSYSTEM_FFLAG_USEOFFSET 16// system origin = entity origin + offset // RENDERSYSTEM_FFLAG_NOANGLES 32// don't copy angles // RENDERSYSTEM_FFLAG_DONTFOLLOW 64// don't copy origin even if entity is found // RENDERSYSTEM_FFLAG_DIRECTTOTARGET 128// PSMOVTYPE_TOWARDSPOINT: entity is our destination // 32 "iFollowFlags" "32" // Studio model attachment if host entity has it "iFollowAttachment" "65535" // Sprite path relative to game mod directory in forward slash (URL/UNIX) format "szTexture" "sprites/rain.spr" // System (name) from which parameters will be initialized to a particle that hits liquid "szSystemOnHitLiquid" "DripCircleSystem" // System (name) from which parameters will be initialized to a particle that hits solid surface "szSystemOnHitSurface" "DripSplashSystem" // System life time in seconds //"fLifeTime" "0.0" }