ID:164708
 
How do i make a mob walk up and down so when it bumps into a wall it goes the opposite direction?
In response to Shyyk
Except that that wasn't what he was asking for.
Genjura wrote:
How do i make a mob walk up and down so when it bumps into a wall it goes the opposite direction?

Sorry, I seemed to have missed that. lol
In response to Shyyk
Er, replying to wrong post like talking to furniture? :P

Anyways Genjura, you can probably program in something with Bump() to make it go in the other direction. EG:
NPC
Bump(atom/a) //Called when the NPC bumps into something (can not move to the direction it wants, eg: dense turf in the way)
if(istype(a,/wall)) //If the atom bumped in to is a wall
walk(src,turn(dir,180)) //Turns the NPCs DIR to the opposet direction and makes it walk that way
return..()
In response to GhostAnime
thats not how isturf works. if(istype(a,/turf/wall)
In response to GhostAnime
GhostAnime wrote:
Er, replying to wrong post like talking to furniture? :P

Anyways Genjura, you can probably program in something with Bump() to make it go in the other direction. EG:
NPC
> Bump(atom/a) //Called when the NPC bumps into something (can not move to the direction it wants, eg: dense turf in the way)
> if(isturf(a,/wall)) //If the atom bumped in to is a wall
> walk(src,turn(dir,180)) //Turns the NPCs DIR to the opposet direction and makes it walk that way
> return..()



Your mom talks to furniture. xD
In response to Xx Dark Wizard xX
Oops, yeah, I meant istype() lol, man I am so outta wack right now >_> *edits previous post* <_<