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 TypeDescription
voidThis function doesn't return anything

Parameters

ParameterTypeDescription
1vec3Position 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

Back to Scripting API