getwall[hitwall].x hitwallx getwall[hitwall].y hitwally getwall[hitwall].point2 hitwallpoint2 getwall[hitwallpoint2].x hitwallpoint2x getwall[hitwallpoint2].y hitwallpoint2y setvarvar hitwallcenterx hitwallx addvarvar hitwallcenterx hitwallpoint2x divvar hitwallcenterx 2 setvarvar hitwallcentery hitwally addvarvar hitwallcentery hitwallpoint2y divvar hitwallcentery 2 getplayer[THISACTOR].posx posx getplayer[THISACTOR].posy posy setvarvar wallxdist hitwallcenterx subvarvar wallxdist posx setvarvar wallydist hitwallcentery subvarvar wallydist posy
And if you want to check your distance from the wall with this method, like for the way I mentioned above, you can use this form of example to help you. This example is for if you're within "item grabbing range" of the wall.
ifvarg wallxdist -845 ifvarl wallxdist 845 { ifvarg wallydist -845 ifvarl wallydist 845 { // do something } }
Let me know if that helps. >.>