Little Fighter Empire - Forums

Full Version: I Need Help For Simple AI Skills
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can you help me ?
I've tried to use the script in the AI, and I want to make my characters has an simple AI.
I have trouble when trying to use the script,
Such as :
if the target is about 100 from the front of the character, the character will issue a skill.
and if the target is about 50 from the front of the character, the character can only defend.
please help me, give an example of a script like that, please !!!
Can you clear the meaning of "from the front of the character"

If you want the target be at the sight of your AI
codes goes like:

if(target.x<self.x xor self.facing)
{
if(abs(target.x-self.x)<=50){D();}
else{
if(abs(target.x-self.x)<=100){**SKILL**;}
}
}

but my codes of my AI is nothing like this, cause this is kind of useless or less efficient~
hope you can get this problem understood from the above codes.