• Winking Gwyn
  • Categories

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

  • Meta

  • Blog Rank: 46,888
02 Mar

Simple slideshow projector

Another one from my series of LSL training courses.

Touches to switch to the next texture; resets if textures are added or removed to the inventory.

integer numberTextures = 0;
integer currentTexture = 0;

default
{
    state_entry()
    {
        numberTextures = llGetInventoryNumber(INVENTORY_TEXTURE);
    }

    touch_start(integer who)
    {
        llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, currentTexture), ALL_SIDES);
        if (currentTexture < numberTextures - 1)
            currentTexture++;
        else
            currentTexture = 0;
    }
   
    changed(integer what)
    {
        if (what & CHANGED_INVENTORY)
            llResetScript();
    }
}
 

6 Responses to “Simple slideshow projector”

  1. 1
    Otenth Paderborn Says:

    Very handy and elegantly simple scripts. Do you intend others to use them?

  2. 2
    Inworld slideshow script « Second Arts Says:

    [...] slideshow script Posted on March 2, 2008 by Morris Vig Gwyneth Llewelyn offers a great little script for inworld, touch-advanced texture [...]

  3. 3
    Corcosman Says:

    Thank you for posting your scripts.

    As someone with zero prior experience in scripting, I appreciate the opportunity to look at scripts. The concepts of scripting seem to sink in bit by bit when I can see how different people write scripts.

  4. 4
    Gwyneth Llewelyn Says:

    You’re welcome to use these scripts, if you think they might be useful! I’ve just posted them here mostly because of the formatting — I needed them colour-coded to copy & paste them for the lessons I did :)

  5. 5
    Avanços na prototipagem « second.ua settlers Says:

    [...] no que diz respeito ao SL), foi dado a conhecer o código necessário para esta funcionalidade (ver código). No entanto, recentemente, foi criada uma nova forma de apresentar slides sem qualquer custo, e [...]

  6. 6
    Peter Stindberg Says:

    Very elegant and minimalistic approach. Congrats!

Leave a Reply

Login Method

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

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

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