This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:commands:createmist [2021/05/24 21:02] – Changed "birthTime" and "fadeTime" to "birthtime" and "fadetime" to match the sample code Argonwolf | 4rpl:commands:createmist [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | < | + | < |
+ | <= [[4rpl: | ||
====== CreateMist ====== | ====== CreateMist ====== | ||
Line 17: | Line 18: | ||
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. | 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. | ||
+ | |||
+ | :NOTE: There is a hidden hard cap for the amount of mist that can exist. When reached, no additional mist will be created.\\ | ||
+ | Avoid calling this API every frame to avoid reaching this cap. Every 5 frames is far more reasonable. | ||
===== Examples ===== | ===== Examples ===== | ||
<code 4rpl> | <code 4rpl> | ||
Line 29: | Line 33: | ||
endif | endif | ||
CreateMist(V3(10 1 10 ) < | CreateMist(V3(10 1 10 ) < | ||
+ | </ | ||
+ | |||
+ | <code 4rpl> | ||
+ | once | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | do(50 0) | ||
+ | CreateMist(V3(10 1 10 ) < | ||
+ | loop | ||
+ | endonce | ||
+ | |||
+ | #This creates a ring-shaped burst of mist particles near the bottom-left corner of the map | ||
+ | #Since " | ||
+ | #By swapping the " | ||
+ | </ | ||
+ | |||
+ | <code 4rpl> | ||
+ | if(GetUnitUpdateCount 5 % eq0) #Ensure we don't make uneccessary mist. | ||
+ | CreateMist(GetUnitPosition(self) < | ||
+ | endif | ||
+ | |||
+ | :Once | ||
+ | Table(" | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | </ | ||
+ | |||
+ | ==== Copy and paste preset: ==== | ||
+ | <code 4rpl> | ||
+ | Table(" | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
</ | </ | ||
< | < | ||