Little Fighter Empire - Forums
Few questions - 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: Few questions (/showthread.php?tid=9197)



Few questions - pikol - 05-03-2014

OK, I'm rather new in AI and don't know how to do few things:
1. How can I add an armor to my character? Like this of Louis, Knight or Julian?
2. How can I make my char do his attack only when there are more than one enemy in the area? Is there something like target1 and target2?
3. I have some skill that last for as long as we want(i.e. charging mp) and I want to stop it under certain conditions, but adding i.e. "if(self.mp>450) {D();}" doesn't seem to work
4. I know I've seen this somewhere but can't find it anymore... How can I check if some enemy attack is flying toward me so I can perform shield?


RE: Few questions - Rhino.Freak - 05-03-2014

The first one, its only by exe editing. Not by AI..


RE: Few questions - A-Man - 05-03-2014

1- What Freaky has said. Can't be changed with AI scripting.
2- First, you loop on all the objects on the screen to see if they exist in the first place. And then keep incrementing some variable to "count" the valid opponents on the field. To do this, you do:
Code:
int no_of_opponentsonscreen=0;
bool rangecheckcondition=true; //you set your range conditioning here
for (int i = 0; i < 400; ++i){
    if (loadTarget(i) == 0 && target.team != self.team && rangecheckcondition){
        no_of_opponentsonscreen++;
    }
}
if (no_of_opponentsonscreen > 1)
    A();  //or whatever combination you would like to use.

3-Try messing around with "D()" parameters. I believe either "D(1, 0)" or "D(1, 1)" makes your character tap the defending key. Also, try placing a "D(0, 0)" after your "D()" as this will insure that D is continuously being pressed and released and not held.

4-Just use the Load target stuff to loop on all the targets, and then check if any is in your Z range moving with a velocity towards you. If true: Defend.


RE: Few questions - pikol - 05-06-2014

Ok, I've got it now, thank you so much :)