mod.fx
Screen effects on the client. On the server these calls do nothing.
mod.fx.shake(amount)
Section titled “mod.fx.shake(amount)”client
Shakes the camera. Follows the player’s shake setting.
| Parameter | Type | |
|---|---|---|
amount |
number |
0 to 12 (clamped). |
Raises
amount must be a number
mod.on("weapon_landed", function() mod.fx.shake(6)end)mod.fx.flash(alpha, seconds?)
Section titled “mod.fx.flash(alpha, seconds?)”client
A white screen flash.
| Parameter | Type | |
|---|---|---|
alpha |
number |
0 to 1 (clamped). |
seconds |
number? |
0.02 to 1, default 0.15. |
Raises
alpha must be a number
mod.on("silo_broken", function() mod.fx.flash(0.6, 0.3)end)mod.fx.blast(x, y, tier?)
Section titled “mod.fx.blast(x, y, tier?)”client
Plays the game’s own explosion for a missile tier at a map position. Only a picture: it does no damage.
| Parameter | Type | |
|---|---|---|
x |
number |
Map pixels. |
y |
number |
Map pixels. |
tier |
number? |
1 to 20, default 1. |
Raises
x and y must be numbers (map pixels)
mod.fx.blast(400, 300, 12)