PDA

View Full Version : onwall


Lash
05-06-2001, 02:43 AM
what is onwall detection and how do u do it?

FxChiP
05-06-2001, 03:57 AM
Depends on how you're using it.

KJS
05-06-2001, 04:42 AM
if your making a moving npc you would do something like

if(!onwall(x-1,y)&&dir=1){
x--;
}

this basically says if there is no wall to the left of him and he is faced left then he can go left...