Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

a touch script help please

Bizcut Vanbrugh
Registered User
Join date: 23 Jul 2006
Posts: 99
04-30-2007 10:51
i am trying to mod a script so that i can set it in something and with each click make it cycle thru frames of a texture then after the last on go back to the fist frame. i got this far but cant figure out how to get the send list to read and i can figure out how to get the floats into where they need to be which would be in a lloffset statement instead of the llsettexture that is there now. i really thought this was gonna be easy but my head hurts just reading the stuff in the wiki LOL.

any help would be greatly appericated

and yes i know they are all the same float value i would change it later


CODE
integer frame;

// This list is for the (U) of the horizontial offset of thetextures to display. The list will
// start on the top and work its way down.
list Uhorzoin =
["-0.210", // frame 1
"-0.210", // frame 2
"-0.210", // frame 3
"-0.210" // frame 4 Do not place a comma after last texture
];

// This list is for the (V) of the verticle offset of thetextures to display. The list will
// start on the top and work its way down.
list Vvert =
["-0.210", // frame 1
"-0.210", // frame 2
"-0.210", // frame 3
"-0.210" // frame 4 Do not place a comma after last texture
];

display()
{
// This two IF statements check to make sure the current page is
// a valid frame number according to available frame
if(frame < 0) frame = 0;
if(frame > llGetListLength(Uhorzoin) - 1) frame = llGetListLength(Uhorzoin) - 1;

// this extracts the current frame out of the list
string textur = llList2String(Uhorzoin, frame);

// Here we set the texture only on the face of the book and nowhere else.
llSetTexture(textur, ALL_SIDES);
}
default
{
touch_start(integer num_detected)
{

display();
}


}
Blaidd Tae
Freelance Consultant
Join date: 3 Jan 2007
Posts: 116
04-30-2007 10:59
there's already a script out there that can do that.

i can give it to you next time i'm in world if you like. :)
_____________________
SL Freelance Consultant
Bizcut Vanbrugh
Registered User
Join date: 23 Jul 2006
Posts: 99
04-30-2007 11:01
AWSOME
thanks loads and loads
Bizcut Vanbrugh
Registered User
Join date: 23 Jul 2006
Posts: 99
04-30-2007 21:59
thou i appericate your scripts you gave me its not what i was looking for .
i want to change the offset of already textured object using a list of coords of float values to do this.
Bizcut Vanbrugh
Registered User
Join date: 23 Jul 2006
Posts: 99
05-01-2007 13:55
after a bit of tweeking and looking at some other scripts i found out how to make this do what want it tod do which is to get the information from the same line of 2 lists and use it as a float to input it then into a llOffSet function and its workign beautifualy thanks for the help