Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This script changes texture on a timer and in order. Change the float of llSetTimerEvent to increase or decrease the time between texture changes. To order you textures name them chronologically or alphabetically.
- integer numberTextures = 0;
- integer currentTexture = 0;
- ChangeTexture ()
- {
- llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, currentTexture), ALL_SIDES);
- if (currentTexture < numberTextures -1)
- currentTexture++;
- else
- currentTexture = 0;
- }
- default
- {
- state_entry ()
- {
- numberTextures = llGetInventoryNumber(INVENTORY_TEXTURE);
- llAllowInventoryDrop (TRUE);
- llSetTimerEvent (20.0);
- ChangeTexture ();
- }
- timer ()
- {
- ChangeTexture ();
- }
- touch_start (integer touches)
- {
- ChangeTexture ();
- }
- changed (integer Change)
- {
- if (Change & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY))
- ChangeTexture ();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement