Saturday, 22 November 2014

AI Attributes, Attack & Damage

The AI Attributes are set up in the same way as the players, meaning it has all the basic stats needed for the game (health through to attack points). Aswell as tracking the stats for the enemy, it checks whether or not the enemy has died.

The method for the attack is fairly basic, it checks to see if there is any collision with the player, and if so deal damage.

Currently for taking damage, there is an AI Damage script attached to the weapon that is attacking the AI. This script checks for collision with the AI and deals the amount of damage based upon the attack stat of the player. Before doing any damage, there is a check to see if there is any armour on the AI, and that decided which stat to be attacked first.

No comments:

Post a Comment