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(); } }

About Gwyneth Llewelyn

I'm just a virtual girl in a virtual world...

2 Pingbacks/Trackbacks

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

  • Pingback: Inworld slideshow script « Second Arts()

  • Corcosman

    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.

  • 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 🙂

  • Pingback: Avanços na prototipagem « settlers()

  • Very elegant and minimalistic approach. Congrats!

  • Rachel

    Hi fantastic thankyou! this is the first one that I’ve got to work in three weeks! I’m a script newbie :o)) one question as a facilitator what can I add to the script to page backwards? just incase I go forward to far – bit unprofessional to reset back to the beginning and page forward again :o)) thanks much appreciated.

  • Rachel

    Hi just noticed something the slides aren’t appearing in sequence despite them being labeled Slide1, Slide2 etc what do I need to change? thanks