I am making a texture changer script which could be used as a book or a photo album.
I am wanting to add a if statement which will stop my counting variable once it hits page 1. thanks in advance.
integer count = 1;
default
{
touch_start(integer total_number) //when touched
//make variable to detect link name
{
string button = llGetLinkName(llDetectedLinkNumber(0));
if (button == "next"
//if the object named next is touched.{
count ++;
llSetTexture((string)count,1); //make color blue
llSetText((string)count,<0,1,0>,1.0);
}
if (button == "back"
//if the back object is clicked{
count --;
llSetTexture((string)count,1); //make the color blue
llSetText((string)count,<0,1,0>,1.0);
}
if (count == 1)
{
/// when my book goes backward to page 1, I want the pages to stop turning back.
}
}
}