![]() |
||
|
[2.2]Programmable AI via scripting - 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: [2.2]Programmable AI via scripting (/showthread.php?tid=7927) |
||
RE: [1.2 Update]Programmable AI via scripting - Azriel - 06-24-2012 self and target are global (yay!), but left(), left(1, 0), left(1) etc. don't work. i've tried finding what the problem is, but can't seem to get anything going:
don't know if that's much help. f0(); f0(0); don't work. Azriel~ RE: [1.2 Update]Programmable AI via scripting - Som1Lse - 06-25-2012 Just wanted to give a heads up, on the porting to AngelScript: It is going rather well, but my computer crashed, and I'm unable to retrieve the data for now. Will be delayed sadly
RE: [1.2 Update]Programmable AI via scripting - Som1Lse - 06-30-2012 Time for an update: Presenting version 2.0: Change log (Click to View) Release, is the version you should use, when you actually play the game. Debug is for when you are writing your code. The source code is available too. You'll need Visual C++ Express 2010, directX SDK 2007 and AngelScript 2.23.1. Depending on where you install them you might have to change some of the paths in the project. AngelScript should be compiled with the same code generation options as the DLL. RE: [2.0]Programmable AI via scripting - Alblaka - 06-30-2012 Can anyone explain the two parameters for the key-press functions at some point? RE: [2.0]Programmable AI via scripting - Boop - 06-30-2012 (06-30-2012, 01:49 PM)Alblaka Wrote: Can anyone explain the two parameters for the key-press functions at some point? What I do is; try all possible combinations until it works like I want it too . Before we had the two inputs and only had A() and stuff, it was doing A(1,0). Then in the basic AI method it'd reset inputs to 0,0 for all the things, and then the method would be called again. Right now since we support rewriting basic ai, we need to allow people to set A(0,0) by them selves. So at the top of all id() (when you are overwriting basic AI) stuff you'd most likely have Code: // reset all inputsIf you are using ego() (which was is what we had previously), you only need to worry about left and right so that walking is possible. I think left(1,1) is walking. RE: [2.0]Programmable AI via scripting - Som1Lse - 06-30-2012 Minor update: 2.1 Added stage_bound and stage_clear global variables. Download: http://www.mediafire.com/?pxd026nqoqgw0 RE: [2.1]Programmable AI via scripting - mfc - 07-05-2012 (06-08-2012, 06:31 PM)Lord Silva Wrote:Quote:quick steps: I dont know why it isn't happening ![]() New Deep acts just like a template. My lf2 version is 2.0a HELP! this is what i've added to data.txt: id: 400 type: 0 file: data\deep.dat in ai folder this is the ai file: ![]() and this is what there is inside file: Spoiler (Click to View) EDIT: VV That worked! RE: [2.1]Programmable AI via scripting - YinYin - 07-05-2012 (07-05-2012, 10:33 AM)xmfcx Wrote: HELP! the syntax is a little stricter now that's why the old code won't work i have not fully grasped all the changes myself but this version of the code you are trying works: Code: int ego(){the most pressing changes are the introduction of the int ego() function and the void id() function if you just want to add special moves and leave the basic AI intact then you will need to put your code into the ego function the way i did up there - however this mirroring script would be a better fit for the id function (basic AI - nothing but your code gets executed) also you will always need ; after any command and variable types are extremely strict - that's why i had to compare all the boolean ones (0 or 1) with true or false now quite difficult compared to chai but hopefully i can update my tutorial for easy comprehension (after all this stuff still recompiles at run time so the better performance and new features really make up for the strict syntax) RE: [2.1]Programmable AI via scripting - Boop - 07-05-2012 There is no need to compare things to be true. if(target.D==true) is the same as: if(target.D) if you want to see if it's not true then you can use: if(!target.D) RE: [2.1]Programmable AI via scripting - A-Man - 07-05-2012 But i think YinYin's way make the code more readable and more beginners friendly. |