ID:111047
 
Not a bug
BYOND Version:480
Operating System:Windows Vista Home Premium 64-bit
Web Browser:Firefox 4.0
Applies to:Dream Seeker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:

On mobs, mouse_opacity seems to get ignored completely when chosen who got clicked on.

Numbered Steps to Reproduce Problem:

Get a A with mouse_opacity=2
Cover it with a B with mouse_opacity=1
(mob B will be on top of mob A because of how layers work)
Try clicking mob A

Expected Results:
you click the mob with mouse_opacity=2

Actual Results:
You click the mob according to layer

When does the problem NOT occur?
When mob A's layer > mob B's

Screenshot of example

Debug Output:
With Aura
clicked Emasym with a mouse_opacity of 1
Without Aura
clicked Master Roshi with a mouse_opacity of 2

Code:
mob
Click()
world<<"clicked [src] with a mouse_opacity of [mouse_opacity]"


This behavior also occurs if I'm simply just on top of him. So no real connection to the overlay.
The behavior you're describing is correct. mouse_opacity=2 means that the transparent parts of the atom will be counted towards any mouse activity, stealing mouse actions away from anything below it. If this atom is beneath another mob with opacity=1 and you click on an opaque part of the top one, the top one receives the click.

If you don't want to click the top object at all, its mouse_opacity needs to be 0.
Ack. That's quite sad. So the only way to counter this would be setting the NPC's layer to a high number.

Maybe a new mouse opacity value should be implemented to correctly do the behaviour I described? One so that if you click wherever, the atom with mouse_opacity=3 on that tile will receive the click above all others
That would really be too difficult to implement, not very intuitive, and wouldn't apply to most games. The mouse_opacity var only refers to how each individual atom reacts to the mouse and whether the mouse click passes through or not.

It seems to me that whatever you're trying to accomplish would be easier to work out another way. Why not bring your problem to the forums and hash it out there?