ID:2136909
 
Code:
area
MouseEntered()
world << "test"


Problem description: This does not work why?

MouseEntered is called when the mouse enters a part of the area's visible icon. Usually, areas have no icon and are layered below turfs. If the status bar shows its name when you mouse over it, MouseEntered should have been called.
You can set area.mouse_opacity to get it, but that opens a whole 'nother can of worms entirely. Like having to pass all other mouse actions through manually because the area would block them all =P
In the big picture, MouseEntered() works very differently from Entered().

Entered() is called on an area when a movable atom physically enters the area; it's also called on any turfs the atom enters. By definition, a movable atom on the map (that isn't inside another movable) is always on at least one turf and in at least one area; and in the past, it was exactly one turf and exactly one area. Because an area is just a way of grouping turfs together, when an atom is on a turf it's also in the area that the turf belongs to.

Mouse hits don't work that way. The mouse cursor is considered to touch one and only one atom, if any: the first whose icon it touches. For this reason, areas seldom get any mouse hits, because they usually don't have icons and they're usually layered well below turfs. The mouse is usually sure to touch one of them before it touches the area's icon.

Similarly, let's say you have a giant opaque obj covering up a bunch of turfs. If you move the mouse cursor around on that obj, the mouse might cross in and out of the space of those covered turfs, but those turfs won't get a MouseEntered() call because the first opaque pixel the mouse hits belongs to the obj covering them. Even though the mouse is ultimately over one of those hidden turfs, what matters is which atom's pixels the mouse is touching.