obj
zombie
icon = 'beings.dmi'
icon_state = "zombie"
var/target = ""
New()
world << "a"
..()
world << "b"
zombie
world << ":::[target]"
if(target == "")
world << "getting target"
for(var/mob/a in view())
if(!(a.ckey == ""))
target = a
goto zombie
else
var/mob/a = target
world << "c"
if(a.y < src.y)
step(src,SOUTH)
world << "c"
goto zombie
if(a.y > src.y)
step(src,NORTH)
world << "a"
goto zombie
if(a.x < src.x)
step(src,WEST)
world << "d"
goto zombie
if(a.x > src.x)
step(src,EAST)
world << "b"
goto zombie</b>
Problem description:i doubt it was that easy but this is my first ai i made it so it had a "test" it should say
a b ::: :::[mob here] c and then a,b,c or d a being north b east c south and d west but it says everything but the direction can someone please help me?
stages:
a starting targeting
b making sure ..() didnt effect something
:::[target] the target it foundshould be empty first cause it dosnt have a target
c if found a target so it goes to getting the dirrection
a,b,c,d it found a direction and started moving to it(dosnt work :/)