er2.nuke 10
Generate a nuke explosion at a certain position. The nuke will devastate a certain area and will spawn a huge explosion visual effect with a never-ending smoke effect. Having multiple nuke smokes leftovers in a map can cause severe performance issues, so use this carefully.
Return value
Return Type | Description |
---|---|
void | This function doesn't return anything |
Parameters
Parameter | Type | Description |
---|---|---|
1 | vec3 | Position of the explosion |
Examples
Nuke explosion example
local EXPLOSION_POSITION = vec3(100, 0, 200) -- World position (use P key in-game to get)
if not global.get("explosion_triggered") then -- check if nuke already happened
er2.nuke(EXPLOSION_POSITION)
global.set(true, "explosion_triggered") -- mark it as happened already to avoid multiple calls, like when master client changes
end