player->bot
: 0 BOT_NONE
, 1 BOT_2PAI
, 2 BOT_2PHUMAN
, 3 BOT_MPAI
. 0-2 function the same as always, while 3 serves as an alternative bot type with full player functionality.G_AddPlayer(*skin, *color, *name, *bot)
, which adds an unmanned player instance to the game. Built off of code started by Tatsuru.G_RemovePlayer(*playernum)
. Despite the name, this is currently set up to only kick players that do not have bot type BOT_NONE
.BotTiccmd
hook.player.blocked
has been created and is read+writable to lua. It tracks whether movement was blocked during the last input frame.player.lastbuttons
has been created and is read+writable to lua. It stores the player's cmd button inputs from last frame.player.botleader
has been created and is read+writable to lua. By default, AI will follow this player, and 2P AI will respawn to them.Notes:
BOT_2PAI
and BOT_MPAI
types are spawned. BOT_2PHUMAN
bots spawned through G_AddPlayer()
will be instantly reset to BOT_2PAI
. G_AddPlayer()
allows for the creation of BOT_NONE
types, but this is strictly as a developer tool to modders; keep in mind that BOT_NONE
players cannot be removed with the G_RemovePlayer
function.player->botmem
has been created as an internal struct for storing AI variables through netcode. However, the struct is potentially subject to change in a future update, and as such has not been made available through the lua framework.BotTiccmd
hook to overwrite the default bot behavior with their own scripts.Example
addplayer.wad
addbot <bot type>
- Adds a bot player instance to the game.
kickbot <playernum>
- Removes a bot player from the game.
getbots
- Outputs player bot-related variable information in the console.