Jump to content

Recommended Posts

Hello! iI found this script and i want to remove two objects -forward/reverse option and leave only one object slideshow with texture preload option, maybe even with speed menu.

how to do that and remove this option? Preloading Slide Viewer Script

// PRE-LOAD and VIEW SLIDES
// Script by Sendao Goodman, 2007
// Modified by Rolig Loon 2009, 2010, 2011, 2012

//--------------------------

// Installation note: This is to be used in a linked 3-prim object.  
//      By default, slides show on face 2 of the root prim (the screen). 
//      One child prim, which must be named "forward", is the forward button. 
//      The other one, which must be named "reverse", is the reverse button. 

//--------------------------
// Drop this script and any images into the root prim and it will cycle every 10 seconds

// Owner: Touch the root prim (viewer screen) to change slide speed or turn it off.
// All Users: Touch the "forward" or "reverse" prim to change slides manually

float gPace = 10.0; 
integer gReload;
list gPics;
integer gLen;
integer gSlide;
integer gChan;
integer gLsn;

loadPictures()
{
    gPics=[];
    integer i = llGetInventoryNumber(INVENTORY_TEXTURE);
    if( i > 0 ) 
    {
        while( i > 0 ) 
        {
            i--;
            gPics += [llGetInventoryName(INVENTORY_TEXTURE,i)];
        }
        gLen = (gPics !=[]);
        llOwnerSay((string)gLen+" pictures loaded");
        gPics = llListSort( gPics, 1, TRUE ); // put them in order
        llOwnerSay("Slides are now set to advance every "+ (string)gPace + " seconds.");
        llSetTimerEvent(gPace);
    }
    else if( gReload == 0 ) 
    {
        llSetTimerEvent(0.0);
    }
}

string getSlide(integer slide)
{
    return llList2String( gPics, (slide+gLen)%gLen );
}

default
{
    on_rez(integer sp)
    {
        loadPictures();
        gSlide=0;
        gReload=0;
    }
    
    state_entry()
    {
        gChan = (integer)("0xF" + llGetSubString(llGetKey(),0,6));
        loadPictures();
        gSlide=0;
        gReload=0;
        llSetLinkColor(LINK_THIS, <0,0,0>, ALL_SIDES );
        llSetLinkColor(LINK_THIS, <1,1,1>, 2 ); // Slides displayed on this face are visible.  All other faces are colored black
    }
    
    listen(integer channel, string name, key id, string msg)
    {
        llListenRemove(gLsn);
        if(msg == "OFF")
        {
            gPace = 0.0;
        }
        else
        {
            gPace += (float)msg;
            if (gPace <= 0.0)
            {
                gPace = 0.0;
            }
        }
        llSetTimerEvent(gPace);
        llOwnerSay("Slides are now set to advance every "+ (string)gPace + " seconds.");
    }
    
    changed( integer ch )
    {
        if( ch & CHANGED_INVENTORY ) 
        {
            gReload = 1;
            llSetTimerEvent(2.0);
        }
    }

    touch_start(integer num)
    {
        if (llDetectedLinkNumber(0) == 1) // The root prim (viewer screen)
        {
            if (llDetectedKey(0) == llGetOwner()) 
            {
                gLsn = llListen(gChan,"","","");
                llDialog(llGetOwner()," \n\nSlides now advance every "+(string)gPace+ " seconds. Select a new speed.",["+2","+5","OFF","-2","-5"],gChan);
            }
        }    
        else if (llGetLinkName(llDetectedLinkNumber(0)) == "forward") //The forward button
        {
            if( gLen > 0 ) 
            {
                integer i=6;
                while( i > 0 ) 
                {
                    i--;
                    llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TEXTURE,i,getSlide(gSlide+(i-2)),<1.0,1.0,0.0>,ZERO_VECTOR,0.0]);
                }
                gSlide = (gSlide+1)%gLen;
            }
        }
        else if (llGetLinkName(llDetectedLinkNumber(0)) == "reverse")  // The reverse button
        {
            if( gLen > 0 ) 
            {
                integer i=6;
                while( i > 0 ) 
                {
                    i--;
                    llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TEXTURE,i,getSlide(gSlide+(i-3)),<1.0,1.0,0.0>,ZERO_VECTOR,0.0]);
                }
                gSlide = (gSlide-1)%gLen;
            }
        }
    }
    
    timer()
    {
        if( gReload == 1 ) 
        {
            gReload = 0;
            loadPictures();
            llSetTimerEvent(gPace);
        }
        else
        {
            integer i=6;
            while( i > 0 ) 
            {
                i--;
                llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TEXTURE,i,getSlide(gSlide+(i-2)),<1.0,1.0,0.0>,ZERO_VECTOR,0.0]);
            }
            gSlide = (gSlide+1)%gLen;
        }
    }
}

 

Share this post


Link to post
Share on other sites

You re-write the script to do so ... if you are looking for someone to wrote the script for you I'd suggest you post in the 'Wanted' forum. This forum is for specific questions on scripting, solutions to specific problems.

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Wandering Soulstar said:

You re-write the script to do so ... if you are looking for someone to wrote the script for you I'd suggest you post in the 'Wanted' forum. This forum is for specific questions on scripting, solutions to specific problems.

 

Thank you! But maybe its just a few lines to remove. Who knows?

Share this post


Link to post
Share on other sites

With help of Rolig Loon I managed to remove the buttons. but now such a task. For example I want to use a screen with two faces. The slideshow is perfectly displayed where needed, but on the screen case (or shell) itself there is also a display of textures and although they are blacked out, which cool but I would like to completely turn off this moment, if that is possible of course. so how to remove the display of textures on other faces of the object?

 

Share this post


Link to post
Share on other sites
Posted (edited)

@Sunbleached .. it is quite clear that you do not know how to code, and are simply searching for someone to modify this script for you. IF you knew anything about coding, you would either not be asking these questions, or at least after @Rolig Loon gave you such kind instructions in the other thread (where you double posted the question) you would be able to do this. Like I said above . this Forum is not a Free Script Modification/Customisation/Creation source.

Edited by Wandering Soulstar
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...