It depends on the type of AI. They normally work by selecting an attack or combo from a list by determining which action will bring about the greatest possible result for the AI. It's impossible to give an example that you could use without knowing how your game works, but in this top down shooter I use an enemy AI so it might be relatable.
Offline
Laserjl wrote:
make a variable, call it damage,and set damage to a random number between 10 and 20 minus enemys defense(variable).
That is not Artificial Intelligence. That's just a script for damage.
Offline