mob
proc
BadGuyMove()
var/turf/lefturf = locate(src.x-1, src.y, src.z)
var/turf/righturf = locate(src.x+1, src.y, src.z)
var/turf/brighturf = locate(src.x+1, src.y-1, src.z)
var/turf/blefturf = locate(src.x-1, src.y-1, src.z)
while (src)
sleep(17)
if (lefturf.density==1)
if (righturf.density==1)
return
if (righturf.density==0)
if (brighturf.density==0)
return
if (brighturf.density==1)
step(src, EAST)
return
if (lefturf.density==0)
if (blefturf.density==0)
return
if (blefturf.density==1)
step(src, WEST)
return
and if this helps the code for the weakling
mob/enemys
weakling
icon='Mob.dmi'
icon_state="weakling"
New()
spawn()BadGuyMove()
Thanks if you can figure out the problem.
-Beld
new()
walk(src,,3)
then set up the Bump() proc like this
Bump()
if(src.dir==EAST)
walk(src,WEST,3)
if(src.dir==WEST)
walk(src,WEST,3)
else
walk(src,WEST,3)//If its not facing east or west, then make it walk west, if it hits something the bump will call and it should start walkin east. You could do this either way.