Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llListen or listen(blahs) broken?

Alicia Mounier
Registered User
Join date: 17 Oct 2005
Posts: 78
08-13-2007 00:39
For some reason when i am typing it keeps making the script function on and off, like making the the light flicker on and off and then stays off. It's just a simple script and should function properly in theory but it's not...
//this is the main one in main prim
CODE

default
{
state_entry()
{
llListen(0, "", llGetOwner(), "");
llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 2.0, 2.0]);
}

listen(integer chan, string name, key id, string message)
{
if (message = "lighton")
{
llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 2.0, 2.0]);
llMessageLinked(LINK_ALL_CHILDREN, -999, "lighton", NULL_KEY);
}
if (message = "lightoff")
{
llSetPrimitiveParams([PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 2.0, 2.0]);
llMessageLinked(LINK_ALL_CHILDREN, -999, "lightoff", NULL_KEY);
}
}
}

//this is the lil one in the child prim
CODE

default
{
state_entry()
{
llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 2.0, 2.0]);
}

link_message(integer sender_num, integer num, string str, key id)
{
if (num = -999)
{
if (str = "lighton")
{
llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 2.0, 2.0]);
}
if (str = "lightoff")
{
llSetPrimitiveParams([PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 2.0, 2.0]);
}
}
}
}


Please try it and see if it is messing up for you. I looked in jira and these forums abit but nothing indicating a prob :confused:
Alicia Mounier
Registered User
Join date: 17 Oct 2005
Posts: 78
08-13-2007 01:27
nvm i messed up the whole == part. Thanks! :o