Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Ok, was up most the night and can't figure this out...

Justice Bulloch
Registered User
Join date: 21 Sep 2007
Posts: 9
12-17-2008 05:15
I have 2 prims, one that will serve as the on/off switch(using touch events) and another that will play a slide show, Display a texture what 10 sec and display another and will continue to do that till the first prim is "touched" again.

I am getting lost with the listener and the loops, im not sure how to handle the looping of the texture while still listening for the off command from the first prim.

Can anyone Help me out?


Thanks in advance!
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
12-17-2008 06:00
Just use a timer event to handle the texture.

Bare bones outline.

CODE

default
{
state_entry()
{
// Set any default texture etc.
}
listen(integer channel, string name, key id, string message)
{
if(message == "start")
{
llSetTimerEvent(10.0);
}
else if(message == "stop")
{
llSetTimerEvent(0.0);
}
}

timer()
{
// do texture change stuff here,
}
}
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
12-17-2008 07:44
Are these prims both in part of the same object/link set? If so, don't bother with listens and such - just have a touch_start event in your script that does something like..

if (llGetLinkName (llDetectedLinkNumber(0)) == "teh switch prim";)
{
.
.
.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
12-17-2008 09:49
From: Meade Paravane
Are these prims both in part of the same object/link set? If so, don't bother with listens and such - just have a touch_start event in your script that does something like..

if (llGetLinkName (llDetectedLinkNumber(0)) == "teh switch prim";)
{
.
.
.

...IF the script is in the root prim.