Automatically pulls the current Player that represents the bot. Returns something with (mostly) incorrect properties (aside from id and team) if the player hasn't initialized yet. You can use BaseGameMode.isReady to check if the player is ready or not.
Creates a base gamemode.
The bot
The game's socket
The game's basic map information
The map index
The ID of the player
The ID of the team the player is on
The input game data (region, code, subdomain, etc)
Whether the bot is the game owner or not
Whether the game is private or not
OptionalrawMap: MapJSONThe raw map data, if the LOAD_MAP Intents is enabled and the map data was successfully loaded
Checks whether the bot can see a specific player. Requires the PATHFINDING Intents to be enabled, otherwise it will throw an error. Basic and not super accurate, but it should work for most cases.
The player to check line of sight to
Whether the bot can see the target player or not
Cleans up a game after the bot leaves
Gets the best target for the bot to attack based on distance and if they're in the line of sight (among other factors)
The best target for the bot to attack, or null if there are no valid targets
Checks whether bot.me is ready to use
Leaves a game
Processes an incoming packet from the server
The raw packet bytes in a Uint8Array
Manually updates the game state; only necessary if the MANUAL_UPDATE Intents is enabled. If you don't have that intent enabled, please don't call this.
The bot attached to the game
The game code
The collectibles spawned in on the map
Whether the bot is the game owner
Whether the game is a "noob" game
Whether the game is private
The game's map information; raw exists if the LOAD_MAP Intents is used
The game mode (spatula)
The game's options in that lil old panel
OptionalpathingThe pathfinding information, if the PATHFINDING Intents is enabled
The bot's ingame ping, if the PING Intents is enabled
The ID of the Player holding the spatula
All of the players in the game
The game region
The websocket instance associated with the game
The spatula coordinates
Advanced data about the game state
The game's cluster subdomain
The team of the Player holding the spatula
The team "score" (the blue/red eggs at the top center of the game), with each index representing the Team enum value
A CTS (capture the spatula) game