![]() |
ego() help - 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: ego() help (/showthread.php?tid=8327) |
ego() help - vonfrank - 10-11-2012 With the help of the users on the forums, I have managed to put together my own AI code for my lf2 mod. Code: // distance to target, positive when faced towards it (vis-a-vis), negative when we are faced in the opposite direction As you can see I have some helper functions (provided by Shymeck, thank you) and then the coding for the special moves. For characters with no advanced base AI attached to their id (id values that are not some of the standard 10 fighters in the game), this AI works perfectly. The problem I have is when this AI is used over top of an id which already had an AI to it which uses special moves. This is the code for id: 8. Because i am using the ego() function, this code is applied on top of the old AI for id: 8 meaning that the character can still use the special moves when its old AI says it can. What I want is the ability to set the base AI for id: 8 to something that will not use any special attacks (something like the AI for the Template character) so that it will ONLY draw on my AI code in order to use special moves. If there is any way to do this (or accomplish what I want through a different method) please let me know. If anyone needs more clarification as to what my problem is, I can try to explain further. Thanks. ![]() RE: ego() help - Boop - 10-11-2012 Try with an empty file and see what moves it does. I'm pretty sure the only move it could do is D>A, thats because that code isn't inside the function that ego detours rather the id() function. The work around is use ID's that don't have D>A associated with it, or use id() which replaces the entire AI. RE: ego() help - vonfrank - 10-11-2012 You're right. With a blank AI file D>A is the only special attack being used. If I use the id() function to completely replace the AI it would mean that i need to write all the basic stuff such as walking, running, jumping, drinking, come, stay, move, ect...... Is there an AI template out there with the basics all written so that I can just add my own code for special moves? RE: ego() help - Boop - 10-12-2012 Not really. YinYin started writing one here: http://www.lf-empire.de/forum/thread-8187.html Basically, the easiest work around is to use different IDs. It's just the way lf2 was written, nothing I can do it about it easily without rewriting a lot of sh*t and breaking stuff etc. RE: ego() help - vonfrank - 10-12-2012 That's OK. Thanks for the help anyway. |