I am sorry for the double post(2D) but no one really checks that. I am using DBC.

In this game I am still having a problem with the collision. The collision works fine but if I am bumping in to the wall and then turn around I end up going backwards through the wall. My code is a simple if sprite collision(#,#)=1 and image=# then X=X-# to push it back. Any thoughts on how to shrink my code and stop me from backing through the wall?
if sprite collision(1,65)=1 and image=7 then xpos=xpos+5
if sprite collision(1,65)=1 and image=3 then xpos=xpos-5
if sprite collision(1,65)=1 and image=1 then ypos=ypos+5
if sprite collision(1,65)=1 and image=5 then ypos=ypos-5
if sprite collision(1,65)=1 and image=2 then xpos=xpos-5 : ypos=ypos+5
if sprite collision(1,65)=1 and image=4 then xpos=xpos-5 : ypos=ypos-5
if sprite collision(1,65)=1 and image=6 then xpos=xpos+5 : ypos=ypos-5
if sprite collision(1,65)=1 and image=8 then xpos=xpos+5 : ypos=ypos+5
The only thing I can think thtats going on is the back of the tank is longer then the barrle so when I turn it overlaps the sandbags.
Again I am sorry for the double post.
Thanks
On target, On time!