The script sets the primitive's texture to FIRST_TEXTURE_NAME
. When the user touches the primitive, it sets the primitive's texture to SECOND_TEXTURE_NAME
. The script then sleeps for 5
seconds using llSetTimerEvent(5)
and sets the primitive's texture back to FIRST_TEXTURE_NAME
.
FIRST_TEXTURE_NAME
and SECOND_TEXTURE_NAME
must be changed to the name of two textures that are placed along with the script in the primitive. Alternatively, UUIDs
can be used instead of names which would not require the textures to be present in the primitive's inventory.
default { state_entry() { llSetTexture("FIRST_TEXTURE_NAME", ALL_SIDES); } touch_start(integer num) { state set; } } state set { state_entry() { llSetTexture("SECOND_TEXTURE_NAME", ALL_SIDES); llSetTimerEvent(5); } timer() { llSetTimerEvent(0); state default; } }