float Timer = 10.0; // speed in seconds
integer choice;
default
{
state_entry()
{
llSetTimerEvent(Timer);
}
timer()
{
integer number = llGetInventoryNumber(INVENTORY_TEXTURE);
choice ++;
if (choice == number)
choice = 0;
string name = llGetInventoryName(INVENTORY_TEXTURE, choice);
if (name != "")
llSetTexture(name, ALL_SIDES);
}
}
TextureSwitcher - Timer (random)
float Timer = 5; // speed in seconds
default
{
state_entry()
{
llSetTimerEvent(Timer);
}
timer()
{
integer number = llGetInventoryNumber(INVENTORY_TEXTURE);
float rand = llFrand(number);
integer choice = (integer)rand;
string name = llGetInventoryName(INVENTORY_TEXTURE, choice);
if (name != "")
llSetTexture(name, ALL_SIDES);
}
}
Texture Switcher--Touch
default
{
touch_start(integer total_number)
{
integer number = llGetInventoryNumber(INVENTORY_TEXTURE);
float rand = llFrand(number);
integer choice = (integer)rand;
string name = llGetInventoryName(INVENTORY_TEXTURE, choice);
if (name != "")
llSetTexture(name, ALL_SIDES);
}
}
テクスチェンジのバリエーションが多すぎるので、どうしたものか(笑
返信削除自分のお店で使ったものだけを記録しておこうと思います。