Skip to content
Virx edited this page Aug 21, 2020 · 3 revisions

main.py

Bot(VirxERLU)

init(self)

This is run once before the game starts.

For example, if you want to initialize any shots and put them in a variable, put that here.

demolished(self)

This is run when the bot isn't on the field because it was demolished.

By default, it just clears the stack then does nothing.

run(self)

This is run during normal gameplay.

handle_match_comm(self, msg)

This is run when the bots receives a match communication.

  • msg - A Python object that is the received match comm.

handle_quick_chat(self, index, team, quick_chat)

This is run when the bot receives a quick chat.

  • index - The index of the bot that sent the quick chat
  • team - The team (0 for blue, 1 for red) of the bot that sent the quick chat
  • quick_chat - The quick chat that was received. See this list for all of the quick chats.
Clone this wiki locally