Jump to content

Object when Hidden is not 'Touchable', and when Shown is 'Touchable'


satyajitdas20
 Share

You are about to reply to a thread that has been inactive for 299 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi,

I have a situation where I have a furniture (or any other created object) and added the scripts (modifiable) which works in the following way:

If i type channel number and 'Hide' (which i have set manually inside the script) the object hides, and if i again type the same channel number and 'Show', it is visible again.

But the point is, even after it is hidden, it is 'touchable' and brings up the menu of the furniture. What it should ideally do is, if it is hidden, it cant be touched at all so that no one knows it is there. (Unless they use Ctrl+Alt+T). And same way it should be again 'touchable' when it is visible. 

Is there is script (script lines) for that which can be added inside the Show/Hide script which is modifiable. 

Thanks in advance.

Link to comment
Share on other sites

Possibly llSetClickAction() toggling between CLICK_ACTION_DISABLED and CLICK_ACTION_NONE will help.

Another option is to jump between states that have a touch handler (when showing) and don't have one (when hiding), which would mean opening the listener again at entry into either state.

Also, I've noticed that different viewers seem to treat PRIM_ALPHA_MODE_MASK differently; in some, the mouse pointer (inconsistently?) hides touchability on sub-threshold masked alpha surfaces although touches may be intercepted anyway.

Link to comment
Share on other sites

2 hours ago, satyajitdas20 said:

But the point is, even after it is hidden, it is 'touchable'

If any of the child prims have a script which actions a touch event these will still respond to a touch even though you have set the root prim to ignore clicks., you might need to ensure that link messages go to all child scripts to disable or enable touches.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 299 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...