Smoke – reference

0. Turning smoke on and off
1. Making _a lot_ of smoke
2. Smoke travelling downwards
3. Smoke blowing sidewards/ angled
4. Moving and smoking at the same time.
5. Rotating – changing smoke angle ingame – DON’T KNOW YET..??


Images of different smoke keyvalue effects.

/*QUAKED target_smoke (1 0 0) (-32 -32 -16) (32 32 16) BLACK WHITE SMOKEON GRAVITY
——– KEYS ——–
“delay” this is the maximum smoke that will show up, default 100ms
“time” time before the smoke disipates, default 5000ms
“duration” time before the smoke starts to alpha, default 2000ms
“start_size” default 24
“end_size” default 96
“wait” the rate at which it will travel up, default 50
“shader” custom shader to use, overrides spawnflags
——– SPAWNFLAGS ——–
BLACK black smoke
WHITE white/grey smoke
SMOKEON starts on
GRAVITY is affected by gravity
——– NOTES ——–
A particle emmiter
*/

 

Default in pics below: default settings + white + smokeon.


“delay” this is the maximum smoke that will show up, default 100ms
1, 20, 50, 75, 100, 120, 150, 170, 200


“time” time before the smoke disipates, default 5000ms
1000, 2000, …, 5000, … , 9000, 10000


“duration” time before the smoke starts to alpha, default 2000ms
50, 100, 250, 500, 1000, 2000, 4000, 6000, 8000, 10000


“wait” the rate at which it will travel up, default 50
1, 5, 10, 25, 50, 75, 100, 250, 500, 1000


“start_size” default 24
1, 5, 15, 20, 24, 30, 40, 50, 75, 100


“end_size” default 96
10, 25, 50, 75, 96, 125, 150, 200, 250, 500


——– SPAWNFLAGS ——–
BLACK black smoke
WHITE white/grey smoke
SMOKEON starts on
GRAVITY is affected by gravity

black, white, white & black, gravity


/*QUAKED target_effect (0 .5 .8) (-6 -6 -6) (6 6 6) TNT EXPLODE SMOKE – – – –
——– KEYS ——–
“mass” defaults to 15. This determines how much debris is emitted when it explodes. (number of pieces)
“dmg” defaults to 0. damage radius blast when triggered
“type” rubble mdel type
——– SPAWNFLAGS ——–
TNT Big explosion when triggered
EXPLODE explosion when triggered
SMOKE Produces smoke when triggered
——– NOTES ——–
rubble types:
“glass”
“wood” (default)
“metal”
“gibs”
“brick”
“rock”
*/


target_effect with smoke triggered by a func_timer every 0.2 seconds



Actions and tricks

0. Turning smoke on and off

If you want to toggle the smoke on/off from its present state -> use the scriptcommand alertentity <targetname> or an entity like func_invisible_user triggering the target_smoke.

If you want to set it to a known state -> use the scriptcommand setstate <targetname> <default | invisble >

Toggling with setstate or setting to a known state with alertentity requires you to keep track of the present state with scripting variables, which is boring.

(Note: Using the scriptcommand alertentity on an entity not present in a game will cause an error (like alerting a destroyed func_explosive). This causes _no_ problem with just a normal smoke entity, though if you remove the smoke entity with scripting commands to do so (kill/remove?) it might. To be sure to avoid any such problems, alert a target_relay and link that to the entity in question or use setstate. If you don’t have target_relay in your editor, check number 7 in this list http://www.splashdamage.com/forums/viewtopic.php?t=4730.)


1. Making _a lot_ of smoke

delay 1
time 10000
duration 10000
wait 500
start_size default 24
end_size 500


2. Smoke travelling downwards

Check gravity spawnflag.

Also, checking the gravity spawnflag produces the same result as setting a negative wait value.

wait:
-50, -30 , -10, 0

Demonstration: big smoke with
i) normal , ii) negative waitvalue , iii) gravity checked , iv) negative waitvalue + gravity checked


3. Smoke blowing sidewards/ angled

Make the target_smoke target a info_notnull.

To move angled smoke downwards you should also check gravity flag or set wait to a negative value.

Smoke with the same downward-sloping angle to info_notnull_big and:
i) nothing, ii) negative waitvalue, iii) gravity

Note here that the distance between the smoke and the info_notnull has an effect:

This is an image of smoke from two sources with the same startposition, with _the same_ upwards-sloping angle though with different distances to their respective info_notnull.

(This is how this looks in GtkRadiant 1024*768 jpg)


4. Moving and smoking at the same time.

Add a scriptname and targetname to the target_smoke, then script a gotomarker for that entity to a path_corner. Works really nice.

These scripting commands work as expected:
gotomarker
setspeed
setposition

These work, though not really as expected
attatchtotrain <targetname> <length>, length seems to affect the smokes start_size, not it’s starting position

These do not work:
faceangles
setrotation
the turntotarget flag on gotomarker
roll on followpath


Feasible ???

5. Rotating – changing smoke angle ingame

2003-10-12    DON’T KNOW YET!

Moving either the target_smoke or the info_notnull does nothing, the angles are set from start. Neither setrotation nor faceangles work. Roll doesn’t seem to work with followpath (only on followspline) so the attachtotrain feature is no use here.


Feasible?

6. Green smoke?

Learn about shaders, find default smoke shader, make a copy with changes, point to that with shader key…


Above this, content by Erik-Ftn