Difference between revisions of "User:Gordon Wendt"

From Second Life Wiki
Jump to navigation Jump to search
(added code snippet with helpful commentary)
(fixing <code> not working properly)
Line 16: Line 16:
<code>
<code>


default
default
{
{
     state_entry()
     state_entry()
    {  
      {
        a = llGetObjectName(); // grabs the current object name and stores it so it can be restored later
          a = llGetObjectName(); // grabs the current object name and stores it so it can be restored later
        llSetObjectName(llGetScriptName() ); // changes the object name to the script name ( see advanced use for more info)
          llSetObjectName(llGetScriptName() ); // changes the object name to the script name ( see advanced use for more info)
        llOwnerSay("this is the test statement"); // your test statement, said with the name of the script name
          llOwnerSay("this is the test statement"); // your test statement, said with the name of the script name
        llSetObjectName(a);// changes the object name back to what it originally was
          llSetObjectName(a);// changes the object name back to what it originally was
 
          // ADVANCED USE: change llGetScriptName() to a string of text (surrounded by quotes ("") or just change the script name
        //ADVANCED USE: change llGetScriptName() to a string of text (surrounded by quotes ("") or just change the script name
      }
    }
}
}
 
</code>
</code>


[[Category:English speaking Volunteers|Gordon Wendt]]
[[Category:English speaking Volunteers|Gordon Wendt]]

Revision as of 13:14, 27 September 2007


I'm Gordon Wendt, I do a little bit of everything in SL and recently was accepted into the volunteer program as a mentor

Free code snippets

A couple of code snippets I"m freely releasing for anyone to use

Naming Trick

A cheap little trick to make the object name on the way the script name then change the object name back

default
{
   state_entry()
     {
          a = llGetObjectName(); // grabs the current object name and stores it so it can be restored later
          llSetObjectName(llGetScriptName() ); // changes the object name to the script name ( see advanced use for more info)
          llOwnerSay("this is the test statement"); // your test statement, said with the name of the script name
          llSetObjectName(a);// changes the object name back to what it originally was
          // ADVANCED USE: change llGetScriptName() to a string of text (surrounded by quotes ("") or just change the script name
     }
}