---------------------------------------------------------------------------
Until Elecbyte decides to add in a trigger that detects
whether the character is controlled by a player or by the
CPU, this code will be used as a workaround. After implementing this little piece, you are free to program
your character's AI, providing that you know how it's done.
This is amongst the 3 most commonly used methods of AI activation.
I'm not sure who first developed this concept, but it is a popular
belief that Visual Kreations first came up with this, showing a few
creators how it was done.
---------------------------------------------------------------------------
This method uses the CMD file to activate the AI. These commands
are impossible to execute by a player but for the CPU, it is not a
problem. However, it heavily relies that the CPU to execute this as
soon as possible, so it's not a guarantee that your character's AI
will activate immediately. (Which could mean a victory, or a lose.)
Add into your CMD file, several AI activation commands. Generally,
the more commands you put in, the odds of the AI activating more quickly
are increased. Adding in about 20-30 commands will suffice.
Here are some examples:
[Command]
name = "AI1"
command = D, D, D, D
time = 1
[Command]
name = AI2"
command = D, F, B, U
time = 1
The "time = 1" is very important, as the command must be executed in that
amount of time. This is of course, impossible for any human to do.
Next you add this in under StateDef -1. This is used to activate the AI
when the CPU executes one of the commands you've made.
[State -1: VarSet]
type = VarSet
triggerall = (Var(0) != 1)
trigger1 = (Command = "AI1") || (Command = "AI2")
var(0) = 1
Simple, no? =)