diff --git a/README.md b/README.md index df355fb..b9db221 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,11 @@ sound/upgrades/jetpack/low.wav Pikachu sound/upgrades/jetpack/jump.wav alexmol @ freesound.org, Q009, Pikachu cc-by-sa 3.0 sound/upgrades/jetpack/lowfuel.wav Pikachu cc0 -sound/upgrades/jetpack/nojumpfuel.wav Pikachu cc0 -sound/upgrades/jetpack/refuel.wav joeseshon @ freesound.org, +sound/upgrades/jetpack/nojumpfuel.wav Pikachu cc0 +sound/upgrades/jetpack/refuel.wav joeseshon @ freesound.org, alexmol @ freesound.org, Pikachu cc-by sound/misc/213096__soundsexciting__gong-with-music.wav SoundsExciting @ freesound.org cc0 1.0 sound/misc/276254__dynajinn__fight-voiceover-fight.wav dynajinn @ freesound.org cc0 1.0 +models/weapons/blaster/blaster.wav ZdrytchX CC-BY +models/weapons/blaster/hit.wav ZdrytchX CC-BY +models/weapons/blaster/missile.wav ZdrytchX CC-BY diff --git a/models/weapons/blaster/blaster.wav b/models/weapons/blaster/blaster.wav new file mode 100644 index 0000000..3c91b14 Binary files /dev/null and b/models/weapons/blaster/blaster.wav differ diff --git a/models/weapons/blaster/hit.wav b/models/weapons/blaster/hit.wav new file mode 100644 index 0000000..080bd23 Binary files /dev/null and b/models/weapons/blaster/hit.wav differ diff --git a/models/weapons/blaster/missile.wav b/models/weapons/blaster/missile.wav new file mode 100644 index 0000000..9254381 Binary files /dev/null and b/models/weapons/blaster/missile.wav differ diff --git a/models/weapons/blaster/weapon.cfg b/models/weapons/blaster/weapon.cfg new file mode 100644 index 0000000..a975b0e --- /dev/null +++ b/models/weapons/blaster/weapon.cfg @@ -0,0 +1,26 @@ +weaponModel models/weapons/blaster/blaster.md3 + +icon icons/iconw_blaster +crosshair 24 gfx/2d/crosshair-blaster + +primary +{ + missileSprite 4 gfx/blaster/orange_particle + missileSound models/weapons/blaster/missile.wav + missileParticleSystem models/weapons/blaster/missilePS + + flashDlightColor 1.0 0.9 0.0 + flashSound 0 models/weapons/blaster/blaster.wav + + missileDlightColor 0.6 0.5 0.0 + missileDlight 150 + + impactMark 4 gfx/marks/burn_mrk + impactParticleSystem models/weapons/blaster/impactPS + impactSound 0 models/weapons/blaster/hit.wav +} +secondary +{ + + flashSound 0 models/weapons/blaster/blaster.wav +} diff --git a/scripts/Example Particle System.txt b/scripts/Example Particle System.txt new file mode 100644 index 0000000..7fa0fdc --- /dev/null +++ b/scripts/Example Particle System.txt @@ -0,0 +1,102 @@ +//I've included a basic particle system. This is basically almost the same as +//the one used in R Funko CZ / ShinyTrem and so this one is basically a +//orange particle that flies and deposits smaller orange particles (missilePS) +//When it hits a surface (impactPS) it will spit out small orange particles in +//a random direction. +//Commented areas are shown to explain each step. +//Best you use C highlighting mode when viewing this file. + +models/weapons/blaster/missilePS //The name of the particlesystem. +{ //It looks like a path but that's just the way it is defined. + ejector //We are ejecting this particle + { + particle //Child Particle type (you can have trails instead) + { + shader sync gfx/blaster/orange_particle //Name of shader, defined in data.1.1.0-pk3 + + displacement 0 0 0 ~2.0 //Random displacement up to 2 units around the particle + //Note that the X and Y values are in relation to the and not the particle, so don't bother using them + //Format: X, Y (Horizontal Plane), Z (Vertical, POSITIVE UP), RandomDirection + + parentVelocityFraction 0.5 //Spawn it with 50% of the particle's velocity + + radius 0 1.5 0.0 //The size of the sprite, second number when spawned, third number when dies. Basically, The particle gets smaller until it dies. + alpha 0 1.0 0.0 //The transparency of the sprite, second number is when spawned and third number is when it dies. It basically fades away. + bounce 0.01 //When hitting a wall, it will bounce, retaining this much speed. Be cautioned though, if the particle spawns with the radius touching the it cannot move. + + lifeTime 400 //How long it will last before it gets deleted + } + + count infinite //Just keep spawning it until the parent dies + delay 0 //Spawning delay of this child particle, in this case it spawns immediately after the parent was spawned + period 10 - ~0% //Interval between spawning. Here, it will spawn 100 times a second, plus no random interval. The ~#% means this random interval gets added ontop of the other interval defined, e.g. 50 - ~50% means it will spawn randomly between 0.05 to 0.1 second intervals. + } +} + +models/weapons/blaster/impactPS +{ + ejector + { + particle + { + shader sync gfx/sprites/smoke //Remember this name is defined in the .shader files. Defined in data.1.1.0-pk3 + + displacement 0 0 0 ~3.0 + normalDisplacement 3.0 //Perpendicular to the wall the parent particle hit. This is added onto the displacement setting, doesn't matter which order. + + velocityType normal //Defined upon spawning + velocityDir linear //Do not change direction nor speed, well at least until the acceleration gets defined below + velocityMagnitude 20 //Spits out 20 units/second ~= 0.62 m/s + velocity 0 0 0 0 + + accelerationType static //Acceleration does not decrease or increase + accelerationDir linear //Do not change direction + accelerationMagnitude 300 + acceleration 0 0 1 0 //Rises against gravity at 300 units/s/s, ~= 9.4 m/s/s. Real life gravity = 9.8 m/s/s + // + + radius 0 4.0 6.0 //Grows bigger + alpha 0 0.5 0.0 //Fades out + rotation 0 ~360 - //Spawns with a random rotation (so the smoke particle doesn't look too spammy) + bounce 0.0 //Sit on the ceiling if it hits the ceiling instead of bouncing off + + lifeTime 500 + } + + count 20 //Spawn 20 at most + delay ~250 //Spawns between 0 and 0.25 seconds after parent spawn + period 10 - ~0% //100 blobs per second + } + + ejector + { + particle + { + shader sync gfx/blaster/orange_particle + + normalDisplacement 3.0 + dynamicLight 20 20 0 { 0.3 0.3 0.0 } //Spawn some light with range X/Y/Z (I think, needs confirmation) and { R G B } colour + + velocityType normal + velocityDir linear + velocityMagnitude 200 + velocity 0 0 0 ~160 //Initial Random velocity in a random direction up to 160 units/sec + + accelerationType static + accelerationDir linear + accelerationMagnitude 600 //600 ups ~= 19 m/s/s, in-game gravity = 800 (25m/s/s) + acceleration 0 0 -1 0 //Falls down + + radius 0 3.0 0.0 //Gets smaller + alpha 0 1.0 0.0 //Fades away + rotation 0 ~360 - //Random oriented sprite + bounce 0.2 //Bounce with 20% speed + + lifeTime 400 //Fades away after 400msec + } + + count 3~6 //Since this is an instantaneous thing, spawn between 3 and 6 particles at once + delay 0 //Spawn without delay + period 0 - ~0% //period delay! Don't ever use count infinity and period 0!!! + } +} diff --git a/scripts/blaster.particle b/scripts/blaster.particle new file mode 100644 index 0000000..651cdfe --- /dev/null +++ b/scripts/blaster.particle @@ -0,0 +1,92 @@ +//Credit: R Funko CZ modification, Rotacak +models/weapons/blaster/missilePS +{ + ejector + { + particle + { + shader sync gfx/blaster/orange_particle //Name of shader + + displacement 0 0 0 ~2.0 + + parentVelocityFraction 0.5 + + radius 0 1.5 0.0 + alpha 0 1.0 0.0 + bounce 0.01 + + lifeTime 400 + } + + count infinite + delay 0 + period 10 - ~0% + } +} + +models/weapons/blaster/impactPS +{ + ejector + { + particle + { + shader sync gfx/sprites/smoke + + displacement 0 0 0 ~3.0 + normalDisplacement 3.0 + + velocityType normal + velocityDir linear + velocityMagnitude 20 + velocity 0 0 0 0 + + accelerationType static + accelerationDir linear + accelerationMagnitude 300 + acceleration 0 0 1 0 + + radius 0 4.0 6.0 + alpha 0 0.5 0.0 + rotation 0 ~360 - + bounce 0.0 + + lifeTime 500 + } + + count 20 + delay ~250 + period 10 - ~0% + } + + ejector + { + particle + { + shader sync gfx/blaster/orange_particle + + normalDisplacement 3.0 + dynamicLight 20 20 0 { 0.3 0.3 0.0 } + + velocityType normal + velocityDir linear + velocityMagnitude 200 + velocity 0 0 0 ~160 + + accelerationType static + accelerationDir linear + accelerationMagnitude 600 + acceleration 0 0 -1 0 + + radius 0 3.0 0.0 + alpha 0 1.0 0.0 + rotation 0 ~360 - + bounce 0.2 + + lifeTime 400 + } + + count 3~6 + delay 0 + period 0 - ~0% + } +}