Unofficial LSL Reference

[[functions:llpasstouches]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

functions:llpasstouches [2015-07-09 12:28 SLT]
sei Expand on the example explanation.
functions:llpasstouches [2016-01-02 09:10 SLT] (current)
sei Reordering
Line 8: Line 8:
 Indicates whether a child prim in a linkset should let the root know that it has been touched. Indicates whether a child prim in a linkset should let the root know that it has been touched.
  
-When a script in the root prim has one of the touch events ($lev[touch_start],​ $lev[touch] or $lev[touch_end]) active, the whole object becomes touchable. However, when a child prim has at least one script that has a touch event active and that prim is touched, by default only that prim will receive the touch, and the root will not receive it. This function allows changing that default, so that //both// the root and the child can receive the touches, or so that the root won't receive them even if the child has no active touch event.+When a script in the root prim has one of the touch events ($lev[touch_start],​ $lev[touch] or $lev[touch_end]) active, the whole object becomes touchable. However, when a child prim has at least one script that has a touch event active and that prim is touched, by default only that prim will receive the touch, and the root will not receive it. This function allows changing that default, so that //both// the root and the child can receive the touches, or so that the root won't receive them even if the child has no active touch events.
  
 This function should be called from a script in a child prim; it has no effect if called from the root prim. This function should be called from a script in a child prim; it has no effect if called from the root prim.
Line 29: Line 29:
   * If the root prim has an active touch event, a touch cursor will be shown for all prims in the linkset, regardless of the setting of this function. In other words, a value of $ct[PASS_NEVER] will not make the hand cursor disappear for the child prim the script is in, even if there'​s no active touch event in the child.   * If the root prim has an active touch event, a touch cursor will be shown for all prims in the linkset, regardless of the setting of this function. In other words, a value of $ct[PASS_NEVER] will not make the hand cursor disappear for the child prim the script is in, even if there'​s no active touch event in the child.
   * $perscript   * $perscript
-  ​* Touch events ​will be active only if the script is running and in a state that has a touch event. If the script stops running, or if the current state has no touch event, there will be no active touch event for that script.+     If the same script calls this function several times, the one that was executed last prevails. If several scripts in the same prim call it, the one with the highest value takes precedence ($ct[PASS_NEVER] has precedence over $ct[PASS_ALWAYS],​ which has precedence over $ct[PASS_IF_NOT_HANDLED]). 
 +  * What does //active// mean in this case? Touch events ​are //active// only if the script is running and in a state that has a touch event. If the script stops running, or if the current state has no touch event, there will be no active touch event for that script.
  
 ===== Short examples ===== ===== Short examples =====