LSL 101/Event Handler Parameters
< LSL 101
Jump to navigation
Jump to search
Revision as of 11:41, 1 June 2009 by Omei Turnbull (talk | contribs) (New page: Category:LSL 101 {{NavNextPrev|prev=Variable Initialization|next=}} When we previously introduced event handlers, we put off explaining the meaning of what was between the paren...)
← Variable Initialization | ↑̲ LSL 101 ̲↑ |
When we previously introduced event handlers, we put off explaining the meaning of what was between
the parentheses in this line:
<lsl> touch_start( integer num_detected )</lsl>
The time has come when we can easily explain this. The phrase integer num_detected is a declaration
of a local variable.
Consider this script:
default {
touch_start( integer num_detected ) { // Announce the region where the script is running string TextPhrase; TextPhrase = "I was just touched " + (string)num_detected + " time."; llOwnerSay( ); }
}</lsl>