Game.SpawnBomb

Declaration

Game.SpawnBomb(Vector3 Position, number Power, bool PlaySound)

Description

Spawns a Bomb at a given Position with provided Power. PlaySound decides if the ticking sound effect should be played.

local SpawnPos = V3(5, 2, 3);
local BlastRadius = 5;

Game.SpawnBomb(SpawnPos, BlastRadius);

Declaration

Game.SpawnBomb(Vector3 Position, number Power, bool PlaySound, Direction PushDirection)

Description

Spawns a Bomb at a given Position with provided Power, and then pushes it in the PushDirection direction. PlaySound decides if the ticking sound effect should be played.

local Push = Direction.Right;

Game.SpawnBomb(V3(2, 1, 2), 3, Push);

Declaration

Game.SpawnBomb(Vector3 Position, number Power, bool PlaySound, Vector3 LaunchTarget, number Speed)

Description

Spawns a Bomb at a given Position with provided Power, and then launches it towards LaunchTarget position with Speed. Launching works similar to the Launcher tile. PlaySound decides if the ticking sound effect should be played.

local Position = V3(1, 0, 5);
local Power = 2;
local LaunchTarget = V3(10, 1, 10);
local Speed = 1;
Game.SpawnBomb(Position, Power, LaunchTarget, Speed);

Declaration

Game.SpawnBomb(Vector2 Position, number Layer, number Power, bool PlaySound)

Description

Spawns a Bomb at a given Tile located at Position on Layer with provided Power. PlaySound decides if the ticking sound effect should be played.

Bomb placement is more accurate when using this method on Slopes.

Works similar to the Spawn Bomb trigger action.

local SpawnPos = V2(2, 1);
local Layer = 0;
local BlastRadius = 2;

Game.SpawnBomb(SpawnPos, Layer, BlastRadius);

Declaration

Game.SpawnBomb(Vector2 Position, number Layer, number Power, bool PlaySound, Direction PushDirection)

Description

Spawns a Bomb at a given Tile located at Position on Layer with provided Power, and then pushes it in the PushDirection direction. PlaySound decides if the ticking sound effect should be played.

Bomb placement is more accurate when using this method on Slopes.

Works similar to the Spawn Bomb trigger action.

local PushDir = Direction.Up;

Game.SpawnBomb(V2(3, 5), 0, 2, PushDir);

Declaration

Game.SpawnBomb(Vector2 Position, number Layer, number Power, bool PlaySound, Vector3 LaunchTarget, number Speed)

Description

Spawns a Bomb at a given Tile located at Position on Layer with provided Power, and then launches it towards LaunchTarget position with Speed. Launching works similar to the Launcher tile. PlaySound decides if the ticking sound effect should be played.

Bomb placement is more accurate when using this method on Slopes.

Works similar to the Spawn Bomb trigger action.

local Position = V2(1, 5);
local Layer = 0;
local Power = 2;
local LaunchTarget = V3(10, 1, 10);
local Speed = 1;
Game.SpawnBomb(Position, Layer, Power, LaunchTarget, Speed);