You could make it not passable and invisible and remove it just after triggering your function.

You could also compare the player's x, y, and z coordinates to the room coordinates and trigger your function when they coincide. I used that on several occasions back in A5.