ID:158304
 
Well This is what i have for the walking part of my Ai.

                    while(target in oview(7))
if(target.x == src.x&&target.y != src.y && target.y > src.y) step(src,NORTH)
else if(target.x == src.x&&target.y != src.y && target.y < src.y) step(src,SOUTH)
else if(target.x != src.x&&target.y == src.y && target.x < src.x) step(src,WEST)
else if(target.x != src.x&&target.y == src.y && target.x > src.x) step(src,EAST)
else if(target.x> src.x&&target.y > src.y)
switch(rand(1,2))
if(1) step(src,EAST)
if(2) step(src,NORTH)
else if(target.x < src.x && target.y < src.y)
switch(rand(1,2))
if(1) step(src,WEST)
if(2) step(src,SOUTH)
else if(target.x < src.x&&target.y > src.y)
switch(rand(1,2))
if(1) step(src,WEST)
if(2) step(src,NORTH)
else if(target.x > src.x && target.y < src.y)
switch(rand(1,2))
if(1) step(src,EAST)
if(2) step(src,SOUTH)
var/mob/b = ""
if(src.dir==NORTH && target.y == src.y +1 &&target.x == src.x) b = target
else if(src.dir==SOUTH && target.y==src.y -1 &&target.x == src.x) b = target
else if(src.dir==WEST && target.x == src.x -1 &&target.y == src.y) b = target
else if(src.dir==EAST && target.x == src.x +1 &&target.y == src.y) b = target

I'm wondering how I would make a Monster shoot a projectile, when they are facing the person, but not right in front of them. Thanks.
Good lord! My eyes are bleeding! And they'd shoot a blast by using a proc at the right time, I presume.
In response to Vic Rattlehead
Vic Rattlehead wrote:
Good lord! My eyes are bleeding! And they'd shoot a blast by using a proc at the right time, I presume.

Hah, I know it's sloppy, I was spending time right now working on it.