02-04-2013, 10:05 PM
(02-04-2013, 08:44 PM)YinYin Wrote: - Is there a more efficient way in determining what is in a specific area, other then iterating through the entire list of loaded objects and checking every single one?Jep, but I cannot afford to lose information when dealing with complex AIs. Imagine just THAT important T3 object was created right after the 120-object smoke cloud and then is never found by the AI, causing it to (f.e.) spam release moves without success (because it can't find the limiter condition).
http://www.lf-empire.de/forum/showthread.php?tid=7976
if you are looking for a specific kind of object you can try to only investigate the range where it is most likely to appear
also object slots always get filled up from low to high numbers - so if you are iterating over a larger empty area (empty object slots) you can cancel the iteration hoping that there won't be an old object lost on a higher slot because the ones below became free (blast/items disappearing)
also I suggest only iterating once, getting important/dangerous object slots (target/item/dangerous attack/ally) and then work with these numbers within all of your script
I do only iterate once per character, though.
Quote:-Did anyone extract/recreate/copy the basic 'id();' LF2 uses for all vanilla chars? If not, did somebody write an own complete id() which could be refitted by me for my own characters? Or at the very least does somebody have a datasheet/list of all features performed by an basic id()-AI (aka fighting, approaching, running, picking objects etc)?I will drop in my notes if I manage to figure out something you haven't already ^^
I am/was trying to create a new basic AI: http://www.lf-empire.de/forum/showthread.php?tid=8187
you can help me if you like
Quote:(AI - unrelatedOh right, that method. Totally forgot about it. Thanks ^^
-Is there a state that permits a character to change his facing based upon pressing left / right WITHOUT influencing the characters frame-behavior (which pretty much cancels out states 0 and 1, I guess)?)
no
there are only two frames that allow this: 110, 212
also the dash frames: 213, 214, 216, 217 (they redirect to 213, 214 though)
then there is the dircontrol in cpoints
and lastly this:
http://www.lf-empire.de/forum/showthread.php?tid=4470
Quote:Not necessary. You can f.e. create a length 16 Array, assuming there will never be 16 duplicates of the ID in question.(02-04-2013, 07:30 PM)Alblaka Wrote: @static variables:that still uses the same amount of memory, won't it?
If creating Arrays is possibe, there is a simpler solution: Creating a basic map.
Implement two static Arrays, the first contains a number of 'num's, the second one the associated value, write a function
int getValueFor (int num)
and done.
Quote:edit: you've posted inside the threads I am linking to yourself ... why exactly are you asking these questions?Because I seem to have forgotten all of that already ^^'
My Creations: (Click to View)
Return (String) System.getNewsOfTheDay();
Barely active, expect slow responses. If at all.
Greetz,
Alblaka