• Winking Gwyn
  • Categories

  • Feeling generous today? Any money received will support the continued web hosting of this blog. Donate towards my web hosting bill!
  • Gwyneth Llewelyn is offline in Second Life.
  • Pages

  • Meta

  • Blog Rank: 124,475
  • Status Updates

    • Allow group ownership of private islands (multiple owners paying the cost for the private island together) http://ping.fm/gXJ6z
      2 days ago
    • [Blog] SL 2.0 Beta still running too slowly on your Mac? No worries!: If, like me, you're not the kind of person th... http://ping.fm/Y0gYX
      10 days ago
    • [Blog] The new possibilities of the XStreetSL "money API"?: I have to confess, I'm quite excited by the tremendous ... http://ping.fm/arSLj
      10 days ago
    • Yay, XStreetSL got some properly working CSS :) No more horizontal scroll bars... it's fluid now :)
      11 days ago
    • [Blog] Where is There?: Nowhere! http://ping.fm/khsS6
      12 days ago
    • Not There Any More: There.com shuts down its virtual world: http://ping.fm/wTCnW
      12 days ago
    • New simulator server software (1.36.4) seems to fix the problem with Estate Bans that didn't work: http://ping.fm/6Zr1W
      12 days ago
    • Call for speakers for the B2P 2010 Spring Conference "Leadership in Business" in #SL, promoted by @B2PBetaTech: http://ping.fm/DhXZT
      13 days ago
    • What a great idea: better integration of shared media and the UI on HUDs (adding transparency): http://ping.fm/FwJL6
      17 days ago
    • Our own @Doubledown_InSL hits CNN: http://ping.fm/W0aEK Congrats, DD! (Thanks for the link, @TrudyTakacs!)
      18 days ago
  • PostRank Topblogs 2009 - #16 in Virtual Worlds
  • RSS My Other Blog

02 Mar

Simple Intra-Simulator Teleporting Tool

Also an exercise for my LSL scripting classes, this one is a simple llSetPos teleporting script. The final location is written as <X,Y,Z> on the object’s description.

vector destination;
key avatar;

default
{
    state_entry()
    {
        destination = (vector)llGetObjectDesc();  
        if (destination == ZERO_VECTOR)
            destination = llGetPos();
        llWhisper(0, "Configured; destination is " + (string)destination);
        llSitTarget(destination, ZERO_ROTATION);
    }
   
    on_rez(integer start_param)
    {  
        llResetScript();
    }

    changed(integer change)
    { // something changed
        if (change & CHANGED_LINK)
        { // and it was a link change
            llSleep(0.5); // llUnSit works better with this delay
            avatar = llAvatarOnSitTarget();
            if (avatar != NULL_KEY)
            {
                // llInstantMessage(avatar, "Going to " + (string)destination);
                llUnSit(avatar);
            }
        }
    }
}
 

Related posts:

  1. Simple Device To Give The Whole Inventory
  2. Simple Door Script, with three states
  3. A tool to aid designing clothes
  4. Simple slideshow projector
  5. Three Years Late… But HTML-On-A-Prim is Here!

Related posts brought to you by Yet Another Related Posts Plugin.

blog comments powered by Disqus

© 2010 Gwyn’s Home | Entries (RSS) and Comments (RSS)

Powered by Wordpress, design by Web4 Sudoku, based on Pinkline by GPS Gazette