Skip to content
Virx edited this page Nov 24, 2020 · 3 revisions

main.py

Bot(VirxERLU)

  • VirxERLU - The Bot class extends the VirxERLU class.

init(self)

This is ran 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 ran every tick 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 ran every tick during normal gameplay.

handle_match_comm(self, msg)

This is ran 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 ran 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