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



Very handy and elegantly simple scripts. Do you intend others to use them?
March 2nd, 2008 at 7:15 pm[...] slideshow script Posted on March 2, 2008 by Morris Vig Gwyneth Llewelyn offers a great little script for inworld, touch-advanced texture [...]
March 2nd, 2008 at 7:38 pmThank 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.
March 3rd, 2008 at 4:55 pmYou’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
March 7th, 2008 at 12:06 am[...] 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 [...]
April 13th, 2008 at 5:27 pmVery elegant and minimalistic approach. Congrats!
May 3rd, 2008 at 7:25 pm