Advertisement
Guest User

Entik's fx script

a guest
Nov 23rd, 2010
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.34 KB | None | 0 0
  1. //General weapon effects
  2. //flash is a 0.25 second event after a weapon is fired
  3. //fire is a single event when weapon is fired
  4. //impact is for weapons impact on something or explode like grenades
  5. //trail is a single event for weapons without projectiles or a constant event when projectile is in motion
  6. //projectile is for rendering the specific projectile
  7.  
  8.  
  9. //Bubbles in the water
  10. //input origin
  11. weapon/common/bubbles {
  12. shader waterbubble
  13. distance 5+rand*10 {
  14. size 1 + rand * 2
  15. random dir
  16. addScale origin dir origin 10 * rand
  17. emitter 1+rand*0.25 {
  18. alphaFade 0
  19. origin2 origin2 + lerp * 8
  20. Sprite
  21. }
  22. }
  23. }
  24.  
  25.  
  26. weapon/rocket/flash {
  27. color 1 0.75 0
  28. size 300 + rand*32
  29. light
  30. }
  31.  
  32. weapon/rocket/projectile {
  33. //Render the rocket
  34. model "models/ammo/rocket/rocket.md3"
  35. dirModel
  36.  
  37. //Sound generated by the flying rocket
  38. loopSound "sound/weapons/rocket/rockfly.wav"
  39. }
  40.  
  41. weapon/rocket/trail {
  42. //The rocket's world light
  43. color 1 0.75 0
  44.  
  45. size 200
  46. Light
  47.  
  48. //The standard smoke puff trail thing
  49. color 0 0 0
  50. alpha 0.50
  51. shader smokePuff
  52. rotate 360 * rand
  53. distance 45 {
  54. emitter 2 {
  55. alphaFade 0
  56. size 8 + lerp * 15
  57. sprite cullNear
  58. }
  59. }
  60. color 1 0.15 0
  61. alpha 0.50
  62. shader flareShader
  63. interval 0.0010 {
  64. normalize parentVelocity v0
  65. inverse v0
  66. wobble v0 velocity 5 + rand*10
  67. scale velocity velocity 75 + rand*50
  68. emitter 0.1 + rand*0.55 {
  69. size 7 * ( 1 - 0.5 * lerp * 1.5 )
  70. colorFade 0.001
  71. moveGravity 0
  72. Sprite
  73. }
  74. }
  75. // color 1 0.75 0
  76. // alpha 0.005
  77. // shader flareShader
  78. // interval 0.001 {
  79. // random velocity
  80. // scale velocity velocity 10 + rand*20
  81. // size 4
  82. // emitter 0.050 {
  83. // colorFade 0.1
  84. // Sprite
  85. // }
  86. // }
  87. }
  88.  
  89. weapon/rocket/impact {
  90. vibrate 70
  91. sound sound/weapons/rocket/rocklx1a.wav
  92. //Mark on the wall, using direction from parent
  93. shader gfx/damage/burn_med_mrk
  94. size 64
  95. Decal
  96.  
  97. // Animating sprite of the explosion
  98. shader rocketExplosion
  99. size 40
  100. //Will be the light colour
  101. color 1 0.75 0
  102. emitter 1 {
  103. Sprite
  104. //size will goto zero after 0.5 of the time
  105. size 300 * clip(2 - 2*lerp)
  106. Light
  107. }
  108. // Fast Moving Particles
  109. color 1 0.75 0
  110. alpha 0.33
  111. shader flareShader
  112. repeat 20 {
  113. random velocity
  114. scale velocity velocity 200 + rand*50
  115. size 1 + rand*2
  116. emitter "0.3 + rand*0.3" {
  117. moveBounce 0 0.9
  118. colorFade 0.7
  119. Sprite
  120. }
  121. }
  122. color 1 0.50 0
  123. alpha 0.33
  124. shader flareShader
  125. repeat 20 {
  126. random velocity
  127. scale velocity velocity 200 + rand*50
  128. size 1 + rand*2
  129. emitter "0.3 + rand*0.3" {
  130. moveBounce 0 0.9
  131. colorFade 0.7
  132. Sprite
  133. }
  134. }
  135. color 1 0.2 0
  136. alpha 0.33
  137. shader flareShader
  138. repeat 20 {
  139. random velocity
  140. scale velocity velocity 200 + rand*50
  141. size 1 + rand*2
  142. emitter "0.3 + rand*0.3" {
  143. moveBounce 0 0.9
  144. colorFade 0.7
  145. Sprite
  146. }
  147. }
  148. }
  149.  
  150.  
  151. weapon/bfg/flash {
  152. color 0.2 0.2 1
  153. size 300 + rand*32
  154. light
  155. }
  156.  
  157. weapon/bfg/projectile {
  158. //ze model
  159. model models/weaphits/bfg.md3
  160. dirModel
  161. //ze flight sound
  162. loopSound "sound/weapons/rocket/rockfly.wav"
  163. }
  164.  
  165. weapon/bfg/trail {
  166. // World Light
  167. color 0.2 0.2 1
  168.  
  169. size 200
  170. Light
  171.  
  172. color 0.2 0.2 1
  173. alpha 0.50
  174. shader flareShader
  175. distance 1 {
  176. normalize parentVelocity v0
  177. inverse v0
  178. wobble v0 velocity 5 + rand*10
  179. scale velocity velocity 75 + rand*52
  180. emitter 0.01 + rand*0.55 {
  181. size 10 * ( 1 - 0.5 * lerp * 1.5 )
  182. colorFade 0.001
  183. moveGravity 10
  184. Sprite
  185. }
  186. }
  187. color 0.7 0.7 1
  188. alpha 0.50
  189. shader flareShader
  190. interval 0.01 {
  191. normalize parentVelocity v0
  192. inverse v0
  193. wobble v0 velocity 10 + rand*10
  194. scale velocity velocity 75 + rand*50
  195. emitter 0.01 + rand*0.55 {
  196. size 0.1 * ( 1 + 40 * lerp * 1.5 )
  197. colorFade 0.001
  198. moveGravity 10
  199. Sprite
  200. }
  201. }
  202. }
  203.  
  204. weapon/bfg/impact {
  205. vibrate 100
  206. sound sound/weapons/rocket/rocklx1a.wav
  207. //Mark on the wall
  208. shader gfx/damage/burn_med_mrk
  209. size 32
  210. decal
  211.  
  212. // Impact Disc
  213. rotate rand*360
  214. shader railExplosion
  215. model models/weaphits/ring02.md3
  216. size 1.6
  217. emitter 0.6 {
  218. dirModel
  219. }
  220. //Plasma style impact mark
  221. color 0.2 0.2 1
  222. size 24
  223. shader gfx/damage/plasma_mrk
  224. Decal energy
  225.  
  226. // Animating sprite of the explosion
  227. shader bfgExplosionNPM
  228. size 45
  229. color 0.2 0.2 1
  230. emitter 1 {
  231. Sprite
  232. size 300 * clip(2 - 2*lerp)
  233. Light
  234. }
  235. // Sparks
  236. color 0.2 0.2 1
  237. alpha 0.33
  238. shader flareShader
  239. repeat 40 {
  240. random velocity
  241. scale velocity velocity 200 + rand*50
  242. size 1 + rand*2
  243. emitter "0.3 + rand*0.3" {
  244. moveBounce 0 0.9
  245. colorFade 0.7
  246. Sprite
  247. }
  248. }
  249. color 0.7 0.7 1
  250. alpha 0.33
  251. shader flareShader
  252. repeat 20 {
  253. random velocity
  254. scale velocity velocity 200 + rand*50
  255. size 1 + rand*2
  256. emitter "0.3 + rand*0.3" {
  257. moveBounce 0 0.9
  258. colorFade 0.7
  259. Sprite
  260. }
  261. }
  262. }
  263.  
  264.  
  265. weapon/grenade/flash {
  266. color 1 0.7 0
  267. size 300 + rand*32
  268. light
  269. }
  270.  
  271. weapon/grenade/projectile {
  272. //Render the grenade model
  273. model "models/ammo/grenadecpma.md3"
  274. anglesModel
  275. }
  276.  
  277. weapon/grenade/trail {
  278. //The standard smoke puff trail thing
  279. //alpha 0.33
  280. //shader smokePuff
  281. //angle 360 * rand
  282. //Emit a sprite every 50 milliseconds
  283. //interval 0.05 {
  284. //emitter 0.700 {
  285. //alphaFade 0
  286. //size 8 + lerp * 15
  287. //sprite cullNear
  288. //}
  289. //}
  290. color 1 0.6 0.3
  291. alpha 0.33
  292. shader flareShader
  293. interval 0.001 {
  294. wobble dir velocity 0
  295. scale velocity velocity 0
  296. size 4
  297. emitter 0.35 {
  298. colorFade 0.001
  299. Sprite
  300. }
  301. }
  302. }
  303.  
  304. weapon/grenade/impact {
  305. vibrate 70
  306. sound sound/weapons/rocket/rocklx1a.wav
  307. //Mark on the wall, using direction from parent
  308. shader gfx/damage/burn_med_mrk
  309. size 64
  310. Decal
  311.  
  312. // Animating sprite of the explosion
  313. shader rocketExplosion
  314. size 40
  315. //Will be the light colour
  316. color 1 0.75 0
  317. emitter 1 {
  318. Sprite
  319. //size will goto zero after 0.5 of the time
  320. size 300 * clip(2 - 2*lerp)
  321. Light
  322. }
  323. color 1 0.75 0
  324. alpha 0.33
  325. shader flareShader
  326. repeat 20 {
  327. random velocity
  328. scale velocity velocity 175 + rand*50
  329. size 1 + rand*2
  330. emitter "0.4 + rand*0.3" {
  331. moveBounce 0 0.9
  332. colorFade 0.7
  333. Sprite
  334. }
  335. }
  336. color 1 0.50 0
  337. alpha 0.33
  338. shader flareShader
  339. repeat 20 {
  340. random velocity
  341. scale velocity velocity 175 + rand*50
  342. size 1 + rand*2
  343. emitter "0.4 + rand*0.3" {
  344. moveBounce 0 0.9
  345. colorFade 0.7
  346. Sprite
  347. }
  348. }
  349. color 1 0.2 0
  350. alpha 0.33
  351. shader flareShader
  352. repeat 20 {
  353. random velocity
  354. scale velocity velocity 175 + rand*50
  355. size 1 + rand*2
  356. emitter "0.4 + rand*0.3" {
  357. moveBounce 0 0.9
  358. colorFade 0.7
  359. Sprite
  360. }
  361. }
  362. }
  363.  
  364.  
  365. weapon/plasma/flash {
  366. color 0.6 0.6 1
  367. size 300 + rand*32
  368. light
  369. }
  370.  
  371. weapon/plasma/projectile {
  372. //The sprite for the plasma
  373. size 14
  374. shader sprites/plasma1new
  375. sprite
  376. //Plasma flying sound
  377. loopSound "sound/weapons/plasma/lasfly.wav"
  378. }
  379.  
  380. weapon/plasma/trail {
  381. color 0.6 0.6 1
  382. alpha 0.1
  383. shader railDisc
  384. interval 0.01 {
  385. normalize parentVelocity v0
  386. inverse v0
  387. wobble v0 velocity 100 + rand*50
  388. scale velocity velocity 10 + rand*50
  389. emitter 0.3 + rand*0.3 {
  390. size 10 * ( 1 - 0.5 * lerp * 1.5 )
  391. colorFade 0.001
  392. moveGravity 10
  393. sprite cullNear
  394. }
  395. }
  396. }
  397.  
  398. weapon/plasma/impact {
  399. vibrate 10
  400. sound sound/weapons/plasma/plasmx1a.wav
  401.  
  402. size 0.6
  403. shader plasmanewExplosion
  404. model models/weaphits/ring02.md3
  405. //Show the ring impact model on a random rotation around it's direction
  406. rotate rand*360
  407. emitter 0.6 {
  408. dirModel
  409. }
  410. size 14
  411. shader gfx/damage/plasma_mrk
  412. Decal energy
  413.  
  414. shader flareShader
  415. alpha 0.8
  416. color 0.6 0.6 1
  417. repeat 2 {
  418. wobble dir velocity 10 + rand*30
  419. scale velocity velocity 200 + rand*50
  420. size 1.5 + rand*2
  421. emitter "1 + rand*0.3" {
  422. moveBounce 400 0.7
  423. colorFade 0.7
  424. Sprite
  425. }
  426. }
  427. }
  428.  
  429.  
  430. weapon/rail/flash {
  431. color 1 0.6 0
  432. size 300 + rand*32
  433. light
  434. }
  435.  
  436. weapon/rail/impact {
  437. vibrate 50
  438. sound sound/weapons/plasma/plasmx1a.wav
  439.  
  440. //The white expanding impact disc
  441. rotate rand*360
  442. shader railExplosion
  443. model models/weaphits/ring02.md3
  444. emitter 0.6 {
  445. dirModel
  446. }
  447. //Plasma style impact mark
  448. size 24
  449. shader gfx/damage/plasma_mrk
  450. Decal energy
  451. }
  452.  
  453. weapon/rail/trail {
  454. //Color1 gets set before calling
  455. //The beam
  456. size r_railCoreWidth*0.5
  457. shader railCore
  458. emitter cg_railTrailTime * 0.001 {
  459. colorFade 0
  460. Beam
  461. }
  462. shader railDisc
  463. //color2 is stored in the parent input structure, retrieve it like this
  464. pushparent color2
  465. pop color
  466. if cg_oldrail {
  467. //Do the rail rings
  468. size r_railWidth*0.5
  469. //Rings take their stepsize from the width variable
  470. width r_railSegmentLength
  471. emitter cg_railTrailTime * 0.001 {
  472. colorFade 0.1
  473. Rings
  474. }
  475. // } else {
  476. //Do a spiral around the rail direction
  477. //Get length in t0
  478. t0 dir
  479. normalize dir
  480. //Create a perpendicular vector to the beam
  481. perpendicular dir v0
  482. //Radius around center
  483. scale v0 v0 4
  484. size 1.1
  485. //Set the rotate around angle to start value
  486. t1 rand*360
  487. //Go through length of beam in repeat steps
  488. repeat ( t0 / 5 ) {
  489. rotatearound v0 dir v1 t1
  490. //Slightly increase beyond regular 10 it so they don't all line up
  491. t1 t1 + 20
  492. addScale v1 dir origin loop * t0
  493. add parentOrigin origin origin
  494. emitter 0.8 {
  495. //5 radius + 6
  496. addScale origin v1 origin lerp * 0.8
  497. colorFade 0.7
  498. Sprite
  499. }
  500. }
  501. }
  502. }
  503.  
  504. weapon/shotgun/flash {
  505. color 1 1 0
  506. size 300 + rand*32
  507. light
  508. }
  509.  
  510. weapon/shotgun/impact {
  511. vibrate 1
  512. //Bullet mark on the wall, shotgun ones are smaller
  513. shader gfx/damage/bullet_mrk
  514. size 4
  515. Decal
  516.  
  517. //explosion cone with animating shader
  518. size 1
  519. shader bulletExplosion
  520. model models/weaphits/bullet.md3
  521. rotate rand*360
  522. emitter 0.6 {
  523. dirModel
  524. }
  525.  
  526. //a single sprite shooting up from impact surface
  527. wobble dir velocity 10 + rand*30
  528. scale velocity velocity 200 + rand*50
  529. size 1 + rand*0.5
  530. shader flareShader
  531. alpha 0.8
  532. color 1 0.6 0.3
  533. emitter 1 + rand*0.3 {
  534. moveBounce 400 0.7
  535. colorFade 0.6
  536. Sprite
  537. }
  538. }
  539.  
  540. weapon/shotgun/trail {
  541. //Yep empty and not called
  542. }
  543.  
  544.  
  545. weapon/machinegun/impact {
  546. soundList {
  547. sound/weapons/machinegun/ric1.wav
  548. sound/weapons/machinegun/ric2.wav
  549. sound/weapons/machinegun/ric3.wav
  550. }
  551. //Bullet mark on the wall
  552. shader gfx/damage/bullet_mrk
  553. size 8
  554. decal
  555.  
  556. //explosion cone with animating shader
  557. size 1
  558. shader bulletExplosion
  559. model "models/weaphits/bullet.md3"
  560. rotate rand*360
  561. emitter 0.6 {
  562. dirModel
  563. }
  564.  
  565. //a single sprite shooting up from impact surface
  566. wobble dir velocity 10 + rand*30
  567. scale velocity velocity 200 + rand*50
  568. size 1.5 + rand
  569. shader flareShader
  570. alpha 0.8
  571. color 1 0.75 0.3
  572. emitter "1 + rand*0.3" {
  573. moveBounce 400 0.7
  574. colorFade 0.6
  575. Sprite
  576. }
  577. }
  578.  
  579. weapon/machinegun/trail {
  580. }
  581.  
  582. weapon/lightning/flash {
  583. color 0.6 0.6 1
  584. size 300 + rand*32
  585. light
  586. }
  587.  
  588.  
  589. //Input origin, dir
  590. weapon/lightning/trail {
  591. shader "lightningBoltNew"
  592. //Standard q3 beam size
  593. size 16
  594. //The beam is repeated every 45 degrees
  595. angle 45
  596. //Draw the beam between origin in direction of
  597. beam
  598. //Length of beam in t0
  599. t0 dir
  600. //Check if we need to render the impact flash effect thing
  601. //That means we end before the maximum lightning range
  602. if ( t0 < 768 ) {
  603. //Clear the previous shader so it uses the one in the model
  604. shaderClear
  605. model "models/weaphits/crackle.md3"
  606. size 1
  607. //Slightly before the endpoint
  608. addScale origin dir origin ( (t0 - 16 ) / t0 )
  609. //Just a random model in it's angles
  610. angles0 rand * 360
  611. angles1 rand * 360
  612. angles2 rand * 360
  613. anglesModel
  614. }
  615. }
  616.  
  617.  
  618. weapon/lightning/impact {
  619. vibrate 5
  620. //random impact sound
  621. soundList {
  622. sound/weapons/lightning/lg_hit.wav
  623. sound/weapons/lightning/lg_hit2.wav
  624. sound/weapons/lightning/lg_hit3.wav
  625. }
  626. //White Sparks
  627. shader flareShader
  628. alpha 0.8
  629. color 0.9 0.9 0.9
  630. repeat 2 {
  631. wobble dir velocity 10 + rand*20
  632. scale velocity velocity 200 + rand*50
  633. size 1 + rand*2
  634. emitter 1 + rand*0.3 {
  635. colorFade 0.7
  636. Sprite
  637. moveBounce 400 0.7
  638. }
  639. }
  640. //Blueish Sparks
  641. shader flareShader
  642. alpha 0.8
  643. color 0.7 0.7 1
  644. repeat 2 {
  645. wobble dir velocity 10 + rand*20
  646. scale velocity velocity 200 + rand*50
  647. size 1 + rand*2
  648. emitter 1 + rand*0.3 {
  649. colorFade 0.7
  650. Sprite
  651. moveBounce 400 0.7
  652. }
  653. }
  654. //Hole mark shader decal
  655. shader gfx/damage/hole_lg_mrk
  656. size 12
  657. decal
  658. }
  659.  
  660.  
  661. weapon/gauntlet/flash {
  662. color 0.6 0.6 1
  663. size 300 + rand*32
  664. light
  665. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement