ID:1563076
 
Code:
obj/HUD/HumanBody
Human
layer=MOB_LAYER+50
mouse_opacity=0
icon='TargetIcon.dmi'
icon_state="Human"
screen_loc="1,4"//18, 19
LeftFoot
layer=MOB_LAYER+50
mouse_opacity=2
icon='TargetIcon.dmi'
icon_state="10"
screen_loc="1,4"
Click()
usr.CurrentTarget="LFoot"
src.icon_state="LFoot"
LeftLeg
layer=MOB_LAYER+50
mouse_opacity=2
icon='TargetIcon.dmi'
icon_state="9"
screen_loc="1,4"
Click()
usr.CurrentTarget="LLeg"
src.icon_state="LLeg"


Problem description:Whenever I click the hud object on screen. The left foot lights up, but whenever I try clicking other parts of the body. LeftLeg it doesn't switch, I'm not sure why though.

Put a debug message inside of Click() and post whether it's showing up or not.
Yes. I tried that a while back lol I clicked randomly on the body and left foot toggled.

But trying to click the leg part all I get is "Left Foot" xHow many times I click it.
You have both the feet and legs with mouse_opacity = 2. Set that to 1 (or remove it outright, 1 is the default) and see if the problem goes away.
Fixed the issue. Thanks for the help.
In response to Marcus55
What was the problem? This issue could pop up for someone else and could prove useful.
The mouse opacity was set to 2 instead of 1. I'm not sure why, but it made it so only one limb could be targeted.
In response to Marcus55
Marcus55 wrote:
The mouse opacity was set to 2 instead of 1. I'm not sure why, but it made it so only one limb could be targeted.

mouse_opacity 2 specifies that the object is treated as though it were dense in every pixel of its icon, not just in non-transparent pixels. This is why it wouldn't let you select anything else, because the top-most limb was opaque to the mouse above the other limbs as well.