Game.SpawnExplosion
Declaration
Game.SpawnExplosion(Vector3 Position, number Power)
Description
Spawns an Explosion at a given Position with provided Power.
local SpawnPos = V3(5, 0.5, 3);
local BlastRadius = 5;
Game.SpawnExplosion(SpawnPos, BlastRadius);
Declaration
Game.SpawnExplosion(Vector3 Position, number Power, bool DontOptimize, bool DontOptimizeTrigger, bool PreventNormalExplosionOptimization)
Description
Spawns an Explosion at a given Position with provided Power.
DontOptimize if set to true will cause this explosion to overlap other normal explosions.
DontOptimizeTrigger if set to true will cause this explosion to overlap other trigger or script spawned explosions.
PreventNormalExplosionOptimization if set to true will cause other explosions to overlap this one.
All of these options should be used sparingly. When an explosion is about to spawn at a position, the game looks for an existing one there, and if it finds one, it resets the timer on that explosion instead of spawning another one, for performance reasons. These options effectively prevent that from happening, and if used frequently could lead to worse performance.
local SpawnPos = V3(5, 0.5, 3);
local BlastRadius = 5;
Game.SpawnExplosion(SpawnPos, BlastRadius, true, true, true);