Difference between revisions of "Template:LSL Function/Pass"
m |
|||
Line 25: | Line 25: | ||
! Description | ! Description | ||
{{!}}- | {{!}}- | ||
{{!}} {{#vardefineecho:PASS_IF_NOT_HANDLED|{{LSL Const|PASS_IF_NOT_HANDLED|integer|0|c={{{3|}}} are not passed | {{!}} {{#vardefineecho:PASS_IF_NOT_HANDLED|{{LSL Const|PASS_IF_NOT_HANDLED|integer|0|c={{{3|}}} are not passed to the root while there is a {{{3|}}} handling script in the prim.}}}} | ||
{{!}} {{#var:value}} | {{!}} {{#var:value}} | ||
{{!}} {{no|not passed}} | {{!}} {{no|not passed}} | ||
Line 31: | Line 31: | ||
{{!}} {{#ifeq:{{{default|}}}|{{#var:cname}}|'''Default:'''}} {{#var:comment}} | {{!}} {{#ifeq:{{{default|}}}|{{#var:cname}}|'''Default:'''}} {{#var:comment}} | ||
{{!}}- | {{!}}- | ||
{{!}} {{#vardefineecho:PASS_ALWAYS|{{LSL Const|PASS_ALWAYS|integer|1|c={{{3|}}} are passed | {{!}} {{#vardefineecho:PASS_ALWAYS|{{LSL Const|PASS_ALWAYS|integer|1|c={{{3|}}} are passed to the root.}}}} | ||
{{!}} {{#var:value}} | {{!}} {{#var:value}} | ||
{{!}} {{yes|passed}} | {{!}} {{yes|passed}} | ||
Line 37: | Line 37: | ||
{{!}} {{#ifeq:{{{default|}}}|{{#var:cname}}|'''Default:'''}} {{#var:comment}} | {{!}} {{#ifeq:{{{default|}}}|{{#var:cname}}|'''Default:'''}} {{#var:comment}} | ||
{{!}}- | {{!}}- | ||
{{!}} {{#vardefineecho:PASS_NEVER|{{LSL Const|PASS_NEVER|integer|2|c={{{3|}}} are never passed | {{!}} {{#vardefineecho:PASS_NEVER|{{LSL Const|PASS_NEVER|integer|2|c={{{3|}}} are never passed to the root.}}}} | ||
{{!}} {{#var:value}} | {{!}} {{#var:value}} | ||
{{!}} {{no|not passed}} | {{!}} {{no|not passed}} | ||
Line 54: | Line 54: | ||
{{#if:{{{default|}}}| | {{#if:{{{default|}}}| | ||
{{#vardefine:header_footnote|{{#var:header_footnote}}{{PBR}} | {{#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. Most users will want to use {{#var:PASS_ALWAYS}} or {{#var:PASS_NEVER}}. | |||
The default value for this attribute is {{#var:{{{default|}}}}}.{{PBR}} | The default value for this attribute is {{#var:{{{default|}}}}}.{{PBR}} | ||
}} | }} | ||
}} | }} | ||
{{#if:{{{tf|<noinclude>*</noinclude>}}}| | |||
{{#vardefine: | {{#vardefine:deepnotes|{{#vardefine:deepnotes|}}{{PBR}} | ||
===={{{ | ==== [[TRUE]] & [[FALSE]] vs. PASS_* flags ==== | ||
Prior to Server Version 1.40.2, for this function 0 and 1 were the only meaningful values and {{LSLPT|{{{1|}}}}} was couched in terms of being a [[:Category:LSL_Integer/boolean|boolean]]. 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_ALWAYS}} solved this problem, allowing content creators to eliminate scripts that were only in the object to tweak the passing of {{{2}}} events. | |||
{{#var: | }} | ||
}} | |||
}}<noinclude> | }}<noinclude> | ||
Line 79: | Line 82: | ||
|- | |- | ||
{{VarPair|spec}} | {{VarPair|spec}} | ||
|- | |||
{{VarPair|deepnotes}} | |||
|} | |} | ||
</noinclude> | </noinclude> |
Revision as of 20:29, 1 January 2016
#var | value | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p__desc | PASS_* flag | ||||||||||||||||||||
also_functions |
| ||||||||||||||||||||
constants_nb |
| ||||||||||||||||||||
caveats |
| ||||||||||||||||||||
spec | |||||||||||||||||||||
deepnotes |
TRUE & FALSE vs. PASS_* flagsPrior to Server Version 1.40.2, for this function 0 and 1 were the only meaningful values and was couched in terms of being a boolean. 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 was changed. Specifically the introduction of PASS_ALWAYS solved this problem, allowing content creators to eliminate scripts that were only in the object to tweak the passing of {{{2}}} events. |