Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I Need Help For Simple AI Skills
#1
[] 
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 !!!
Reply
Thanks given by:
#2
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.
Reply
Thanks given by: AmadisLFE




Users browsing this thread: 2 Guest(s)