![]() |
I Need Help For Simple AI Skills - Printable Version +- Little Fighter Empire - Forums (https://lf-empire.de/forum) +-- Forum: Little Fighter 2 Zone (https://lf-empire.de/forum/forumdisplay.php?fid=7) +--- Forum: AI Scripting (https://lf-empire.de/forum/forumdisplay.php?fid=56) +--- Thread: I Need Help For Simple AI Skills (/showthread.php?tid=9466) |
I Need Help For Simple AI Skills - Naufal - 11-02-2014 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 !!! RE: I Need Help For Simple AI Skills - like1996 - 11-02-2014 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. |