User:XylaAodha Resident/PassTouchTestPage
Wiki description
Sets the pass-touches prim attribute.
Examples
/* This script goes in the root prim */
default
{
touch_start(integer total_number)
{
llSay(0, "Root touched START.");
}
/* Uncomment block to verify behavoir for all types of touch event */
/*
touch(integer total_number)
{
llSay(0, "Root touched HELD.");
}
touch_end(integer total_number)
{
llSay(0, "Root touched END.");
}
*/
}/* This script goes in the child prim */
default
{
state_entry()
{
/* Uncomment PASS_ALWAYS to comfirm this is not the default
(as previous stated on this page,
the error was corrected when this example was added) */
//llPassTouches(PASS_ALWAYS);
/* Uncomment PASS_IF_NOT_HANDLED to return to default behavour */
//llPassTouches(PASS_IF_NOT_HANDLED);
}
touch_start(integer total_number)
{
llSay(0, "Child touched, type START.");
}
/* Uncomment block to verify behavoir for all types of touch event */
/*
touch(integer total_number)
{
llSay(0, "Child touched, type HELD.");
}
touch_end(integer total_number)
{
llSay(0, "Child touched, type END.");
}
*/
}See also: functions
See also: events
History
- Introduction: ?
- Change: SVC-5923 - Server version 1.40.2 - New
passvalue added: 2
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-3306|Add enumeration to [[llPassCollisions]]() to provide [[PASS_ALWAYS]], [[PASS_IF_NOT_HANDLED]], and [[PASS_NEVER]] as explicit options.<br>(Was: {{LSLGC|Collision}}s passed to parent REGARDLESS [[llPassCollisions]]([[FALSE]]) in child)|type=nf|status=fixp}}Original shared helper source (conditional wiki logic is not evaluated)
[[:Category:LSL {{{1}}}|{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]]<noinclude>
{{Documentation}}
</noinclude>Original shared helper source (conditional wiki logic is not evaluated)
<noinclude>{{Multi-lang|category=LSL}}</noinclude>{{LSL Injection Test}}{{#if:
{{#vardefine:header|{{#var:header}}
{{#switch:{{#if:{{{nc|}}}|Template|{{NAMESPACE}}}}|Template=|User=|}}}}
{{#vardefine:p_{{{1|}}}_desc|PASS_* flag }}
{{#vardefine:p_{{{1|}}}_hover|PASS_* flag }}
<!--
<includeonly>
{{#ifeq:{{#var:article-type}}|event||{{#if:{{#pos:{{#var:moded}}|r}}{{#pos:{{#var:moded}}|u}}||{{#vardefine:hidden-text|{{#var:hidden-text}}
{{LSLC|Pass{{#var:lang}}}}{{#if:{{{mode|}}}|{{LSLC|Pass/{{{mode}}}{{#var:lang}}}}}}
}}}}}}
</includeonly>
-->
{{#if:{{{noconst|}}}{{#var:pass_constants}}||
{{#vardefine:constants_nb|
{{LSL Constants/Pass|{{{1|}}}|{{{2|}}}|{{{3}}}|default={{{default|}}}}}{{#var:constants_nb}}}}
{{#vardefine:pass_constants|*}}
}}
{{#if:{{{nocaveats|}}}||
{{#vardefine:caveats|
* Has no known effect if called from within the root prim.
* The script must be located in the prim whose pass-touch behavior is being changed; if not, the prim reverts to the default pass-touch setting.
{{#var:caveats}}}}
}}
{{#if:{{{default|}}}|
{{#vardefine:header_footnote|{{#var:header_footnote}}{{PBR}}
Whether {{{3|}}} are passed to the root prim depends not only on which PASS_* flag is selected, but may also depend on if there is a script that in the prim that handles one of the {{{2|}}} events. For this reason most users will want to use {{#var:PASS_ALWAYS}} or {{#var:PASS_NEVER}} as they do not have this variable behavior.
The default value for this attribute is {{#var:{{{default|}}}}}.{{PBR}}
}}
}}
{{#if:{{{tf|<noinclude>*</noinclude>}}}|
{{#vardefine:deepnotes|{{#vardefine:deepnotes|}}{{PBR}}
==== [[TRUE]] & [[FALSE]] vs. PASS_* flags ====
Prior to Server Version 1.40.2, {{LSLPT|{{{1|}}}}} was couched in terms of being a [[:Category:LSL_Integer/boolean|boolean]] and the only meaningful values were 0 and 1. The best practice at that time was to use the integer constants [[TRUE]] and [[FALSE]]. The design of this function left much to be desired. The problem was that while [[TRUE]] always caused all {{{3}}} to be passed along to the the root, [[FALSE]] would only not pass {{{3}}} if there the prim had a script that handled a {{{2}}} event. This meant to fully utilize this function the prim must contain a script that handled {{{2}}} events! With the release of Server Version 1.40.2, the PASS_* flags were introduced and the subtype of the {{LSLPT|{{{1|}}}}} was changed. Specifically the introduction of {{#var:PASS_NEVER}} solved this problem, allowing content creators to eliminate scripts that were only in the object to tweak the passing of {{{2}}} events.
}}
}}
}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|p_{{{1|}}}_desc}}
|-
{{VarPairTable|also_functions}}
|-
{{VarPair|constants_nb}}
|-
{{VarPair|caveats}}
|-
{{VarPair|spec}}
|-
{{VarPair|deepnotes}}
|}
</noinclude>Additional wiki content
__NOINDEX__
NOINDEX:
{{NOINDEX}} Not sure how this page has become linked on the overview list. It is just a test page to work on while trying to figure out how to fix PASS_ALWAYS being shown as default, and the function say we want to use PASS_ALWAYS all the time.
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.