This is an old revision of the document!
⇐ Index
CreateMist
CreateMist(<-pos <-initParams)
Description
Creates a mist at the specified position. A mist is a small piece of 'fog'. The init params control its behavior.
The possible values in initTable are:
“color” : The color of the mist. White is the default color. A Vector.
“color2” : If specified, the mist color will be randomly lerped from color to color2.
“birthTime” : The amount of time, in frames, that the mist will not fade. The mist's total lifetime is birthTime+fadeTime.
“fadeTime” : The amount of time, in frames, that the mist fades out. The mist's total lifetime is birthTime+fadeTime.
“direction” : The direction and speed that the mist moves. A Vector.
“startradius” : The radius around the starting position that the mist is created. A random location is chosen with the radius. The direction is perpendicular to the plane that the starting point will be in.
“endradius” : The radius around the 'ending' position that the mist is created. The ending position is at a distance based on the direction vector. The end is not related to the birth and fade time.
Each value in the color and color2 vectors is a floating point number where 1 is full brightness and 0 is minimal brightness. Values over 1 make the mist glow.
Examples
if (-?initData not)
Table("color" V3(1 0.8 0.8)
"color2" V3(0.2 0 0)
"birthtime" 40
"fadetime" 20
"direction" V3(1 5 1.5)
"startradius" 0.5
"endradius" 1 ) ->initData
endif
CreateMist(V3(10 1 10 ) <-initData)
⇐ Index