Don't know about TrackObjectN, in this instance I don't know if you would really need the traversal specification, but here's a short script that works for doors and windows that are embedded in walls: