Talk:Linden Scripting Language: Difference between revisions

Content deleted Content added
SineBot (talk | contribs)
m Signing comment by 72.29.167.236 - ""
No edit summary
Line 40:
 
default { state_entry() { llSay(0, "Hello, World"); } } is the Hello World for LSL. The touch event is simply there by default. <small>—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/128.118.31.24|128.118.31.24]] ([[User talk:128.118.31.24|talk]]) 00:09, 27 February 2008 (UTC)</small><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
 
actually, that is the "Hello, Avatar" program for LSL. LSL doesn't use "Hello, World", it uses "Hello, Avatar". The program showing is the default program created by the LSL editor whenever "New Program" is chosen, and that program includes the touch event as shown. Please see LSL's own wiki for documentation at http://wiki.secondlife.com/wiki/Hello_Avatar. [[User:CatDeville|CatDeville]] ([[User talk:CatDeville|talk]]) 21:52, 23 August 2008 (UTC)
 
== state_entry not triggered by rezzing an object ==
I also corrected this erroneous statement. Hello, Avatar is not triggered on rez. Triggering an event on rez requires the on_rez event. Hello, Avatar is triggered on state_entry... i.e., whenever the script enters the state in which the event resides, in this case the default state. Since this particular state entry is inside the default state, it triggers when the script is initialized or reset, so I altered the wording to reflect that while trying not to get too detailed. The idea that state_entry triggers on rez is a common error which is even propogated by some scripting teachers in LSL, but if you review the LSL Portal wiki or if you test it yourself in SL you'll see this is not true. [[User:CatDeville|CatDeville]] ([[User talk:CatDeville|talk]]) 21:52, 23 August 2008 (UTC)