I got a question about AI scripting (only one at this moment, but I am still having problems all the time, so there just might be more problems coming up that I don't know how to fix :P).
1. Self.mp.
My character can recharge MP by pressing DJA+A+A+A... I made the input DJA+DJA+A+A+A... for the AI as the normal input didn't work well.
I got a question regarding the self.mp tag in the script. I have it there, but it doesn't seem to work. The AI is supposed to stop pressing A when his MP is >400. However, it doesn't. He DOES stop charging when the opponent is in his space (< 225 on x-axis, < 60 on z-axis). Who knows what the problem might be?
..and later in the script
Or can a limit of 500 MP be set in data? (I don't think so, right?)
1. Self.mp.
My character can recharge MP by pressing DJA+A+A+A... I made the input DJA+DJA+A+A+A... for the AI as the normal input didn't work well.
I got a question regarding the self.mp tag in the script. I have it there, but it doesn't seem to work. The AI is supposed to stop pressing A when his MP is >400. However, it doesn't. He DOES stop charging when the opponent is in his space (< 225 on x-axis, < 60 on z-axis). Who knows what the problem might be?
DC-Code:
if (abs(100*(self.z-target.z)/((self.x-target.x)*((self.facing?1:0)*2-1))) <= 15 && abs(self.x-target.x) > 300 && abs(self.x-target.x) < 600){ if (self.mp >= 300 && self.x-target.x > 0){DlJ();} //D<J else if (self.mp >= 300 && self.x-target.x < 0){DrJ();} //D>J else if (self.mp <= 200 && (self.x-target.x > 225 && self.z-target.z > 60)) {DJA();} //DJA |
..and later in the script
DC-Code:
if (self.frame == 198) {DJA();} //DJA+A+A.. (this leads to the first charge, the rest of the charging is done by pressing Attack:) if ((self.mp <= 400) && self.frame == 21 || self.frame == 20 || self.frame == 22 && (self.x-target.x > 225 && self.z-target.z > 60)) {A();} //DJA+A+A.. if ((self.mp <= 400) && self.frame == 21 || self.frame == 20 || self.frame == 22 && (target.state == 12 || target.state == 14)) {A();} // DJA+A+A.. |
Or can a limit of 500 MP be set in data? (I don't think so, right?)