Skip to content

Global Class "Ambush"⚓︎

Info

You can get this class by using the Ambush global table.

Note that to call these functions, you must use a . (period) instead of a : (colon)!

Example Code
1
local currwave = Ambush.GetCurrentWave()

Functions⚓︎

GetCurrentWave ()⚓︎

int GetCurrentWave ( )⚓︎

Returns the current wave number of the current challenge room or boss rush room.


GetMaxBossrushWaves ()⚓︎

int GetMaxBossrushWaves ( )⚓︎

Returns the maximum amount of boss rush waves.

By default, the maximum amount of boss rush waves are 15. It's important to note that mods can modify the maximum amount of boss rush waves.


GetMaxChallengeWaves ()⚓︎

int GetMaxChallengeWaves ( )⚓︎

Returns the maximum amount of challenge room waves.

By default, the maximum amount of challenge room waves are 3. It's important to note that mods can modify the maximum amount of challenge room waves.


GetNextWave ()⚓︎

RoomConfigRoom GetNextWave ( )⚓︎

Returns the RoomConfigRoom of the next challenge room wave. Calling this function outside of a challenge room will result in an error.


GetNextWaves ()⚓︎

RoomConfigRoom[] GetNextWaves ( )⚓︎

Returns a table containing the RoomConfigRoom of the next challenge room waves.


SetMaxBossrushWaves ()⚓︎

void SetMaxBossrushWaves ( int Waves )⚓︎

Sets the maximum amount of boss rush waves. As of now, there is a maximum cap of 25 waves.


SetMaxChallengeWaves ()⚓︎

void SetMaxChallengeWaves ( int Waves )⚓︎

Sets the maximum amount of challenge room waves.

Bug

Currently this value is not reset on game restart. This will be fixed as soon as we figure out how to cleanly run code on init on the C++ side!


SpawnBossrushWave ()⚓︎

void SpawnBossrushWave ( )⚓︎

Spawns a boss rush wave in the current room.

Bug

Calling this function will do nothing unless a boss rush has been triggered at least once during the current game session.


SpawnWave ()⚓︎

void SpawnWave ( )⚓︎

Spawns a challenge room wave associated with the current floor.

Bug

Calling this function crashes the game if the current game mode is Greed or Greedier.

The game also crashes if the current floor is Blue Womb.


StartChallenge ()⚓︎

void StartChallenge ( )⚓︎

Triggers the challenge room or boss rush.

Bug

Calling this function outside of the boss rush room or a challenge room will do nothing except permanently close the doors, resulting in a softlock.