Posts: 2,340
Threads: 78
Joined: Mar 2008
06-20-2012, 03:47 PM
(This post was last modified: 06-20-2012, 03:50 PM by YinYin.)
trust me it works
yes you do have to skip basic AI
but you never get to see the standing frame as it starts walking before that gets printed to the screen
and the double tap for running only works in state 1, which wont happen with this code
edit: and z axis movement can be done separately and they work perfectly at the same time - see my mirror AI
edit: i guess i will start a thread with all my AI scripts just like you
edit: also state 0 is not rare for basic AI - it can be read after every next 999 before it starts walking off again
Thanks given by:
Posts: 1,696
Threads: 60
Joined: Jan 2009
Hmmm... I will have to refine some lines of my AI scripts then.. currently Striker tends to do an interesting running back and forth dance for a few seconds until he manages to stop within the target area ^^'
Version 1.10 out now!
Version 1.02 out now!
Version 1.22 out now!
Return (String) System.getNewsOfTheDay();
Barely active, expect slow responses. If at all.
Greetz,
Alblaka
Thanks given by:
Posts: 1,556
Threads: 77
Joined: May 2011
07-26-2012, 11:07 AM
(This post was last modified: 07-26-2012, 11:07 AM by A-Man.)
How do i let the AI switch the target to a ball if it is near?
Thanks given by:
Posts: 2,340
Threads: 78
Joined: Mar 2008
you will need to run a for loop inside the id function that goes through all object slots that can contain hostile projectiles and check them all through (distance/direction/speed, team and type)
store the object number if the conditions for it being threatening are met - overwrite it if you find a closer/more threatening object in a later loop
once the loop is done reload the most threatening object (last object number stored) - voila, target changed
keep in mind you will also need to still apply conditions for normal character targeting (and possibly also item picking if you want your char to do that)
Thanks given by:
Posts: 2,340
Threads: 78
Joined: Mar 2008
08-08-2012, 07:11 PM
(This post was last modified: 08-08-2012, 07:12 PM by YinYin.)
UPDATE for Angel Script!
now including a separate function and error section
edit: i might be missing a few new variables - i will double check them myself later but if you already recognize something missing just post it here
Posts: 1,556
Threads: 77
Joined: May 2011
Nice work man. There is still one thing you forgot to note. The line number noted in the exception starts the counting with 1, and starts counting at the first line of the text file, not the main function. It took me a while to figure out that the first blank lines are counted, and i kept staring at the right code thinking that the problem is there.
Thanks given by:
Posts: 2,340
Threads: 78
Joined: Mar 2008
well i am kind of assuming you are using some sort of editor that does the line and position counting for you just like the data changer - this is pretty common
Thanks given by: