Zelda Game HitTest help

Hi,im experimenting with making a zelda game (not tile-based) and am in need of a code for when the hero hits a wall. I know this has been asked so many times before but i just cant seem to get a suitable code.