I am trying to create a screen overlay (worn like a HUD) that will start as soon as someone wears it rather than after they click it. I've played around with touch_event which requires a touch (obviously). I then tried using ClickAction(s) but none of them seem to work. Could someone point me in the right direction?
Here is the basic script I'm playing with, the line in bold is what I've having trouble with:
integer textureIsBeingAnimated;
default
{
touch_end(integer num_detected)
{
if (textureIsBeingAnimated)
llSetTextureAnim(ANIM_ON | SMOOTH | SCALE | PING_PONG | LOOP, ALL_SIDES, 1, 1, 1, 5.0, 0.1);
else
llSetTextureAnim(FALSE, 0, 0, 0, 0.0, 0.0, 0.5);
// toggle back and forth between TRUE (1) and FALSE (0)
textureIsBeingAnimated = !textureIsBeingAnimated;
}
}
Thanks!