These statements are the way the game should work.
The door does not open immediately when you get the key, you need to walk over and touch the door to open it.
Door is always visible!
Cannot get treasure without getting past door.
If your sprite gets stuck trying once it hits a wall, make it so you can actually move in one direction even while you are touching the wall. Example:
when [d v] key pressed forever if < touching color (black) > then point in direction (-90) move (5) steps else point in direction (90) move (5) steps end