Fire Sustain Guide

From Gladiabots Wiki
Jump to: navigation, search

The Problem

A classic problem in Gladiabots is bots switching targets mid-shot and never getting a shot off. Let's start with a very simple combat AI.

A very simple AI

As you can see, the attack command executed is to just always attack the closest enemy in range. What often happens with this attack is that another enemy walks in closer while you are aiming, causing you to switch to this new target, before having fired a shot. This is almost always a bad idea, but how can we remedy this?

Keep attacking

The first thing we can do is just simply keep attacking any target we're attacking. The game explains this mechanic in the Advanced Training tutorial "Pursue Current Target". I suggest that you redo this tutorial before continuing to read this guide, because it nicely illustrates another problem you can have without a good fire sustain.

Attack the closest bot in range, attacked by me

Let's add this node to our simple AI. It should precede any other attack nodes and always have the highest priority, so that our bots can no longer switch targets while attacking.

A simple AI with sustain node


This guide is still incomplete, but you can have a look at the Mini Tutorials for an example of a shotclock.