Hmmm... iterating over 100 for now. Should cover the bandwith of a normal fight.
Btw, the AI appears to be calculating even whilst being dead (judging by console prints). Probably want to fix that potential leak?
edit:
Lethal.
For some reason the creation of a variable appears to be EXTREMELY CPU intensive...
Could we may get a .type? Then I could iterate whilst filtering for loadTarget!=-1 and then proceed iterating through a set of target.type=* cases
editedit:
Appears to work all fine, too. 2x loadTarget but still quite smooth, as long as the object count keeps low (<30)
Still would prefer a .type solution.
PS: Striker is making good progress. Only thing left is his Chidori move, which is complex in both DC and usage means... Not sure whether I can code the AI to use it properly. But if I succeed, I want a cookie :3
Btw, the AI appears to be calculating even whilst being dead (judging by console prints). Probably want to fix that potential leak?
edit:
Code:
for (var i = 0; i < 100; ++i)
{
var t = loadTarget(i)
For some reason the creation of a variable appears to be EXTREMELY CPU intensive...
Could we may get a .type? Then I could iterate whilst filtering for loadTarget!=-1 and then proceed iterating through a set of target.type=* cases
editedit:
Code:
for (var i = 0; i < 100; ++i)
{
if (loadTarget(i) != -1)
{
var type = loadTarget(i)
Still would prefer a .type solution.
PS: Striker is making good progress. Only thing left is his Chidori move, which is complex in both DC and usage means... Not sure whether I can code the AI to use it properly. But if I succeed, I want a cookie :3
My Creations: (Click to View)
Return (String) System.getNewsOfTheDay();
Barely active, expect slow responses. If at all.
Greetz,
Alblaka