LSL 101/Event Handler Parameters
< LSL 101
| ← 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>