I'm trying to do something I think should be simple. Pick up the colour of the prim light after its changed using the Edit/More/Features/Light/Color. However the CHANGED_COLOR doesn't seem to do anything after I close Edit. I know the scipt is working as the CHANGED_INVENTORY works just fine.
Am I missing something? Thanks - D
// -----------------------------------
get_prim_settings()
{
list prim_settings = llGetPrimitiveParams([PRIM_POINT_LIGHT]);
llOwnerSay((string)prim_settings);
Light_Colour = (vector)llList2String(prim_settings, 1); // Light colour
Light_Intensity = (float)llList2String(prim_settings, 2); // Light intensity
Light_Range = (float)llList2String(prim_settings, 3); // Light range
Light_Falloff = (float)llList2String(prim_settings, 4); // Light falloff
}
// -----------------------------------
default
{
changed(integer change)
{
// Check for inventory change re options card.
if (change & CHANGED_INVENTORY) // Test for a changed inventory
{
read_optionscard(); // Read options note card
}
// Check for colour change.
else
if (change & CHANGED_COLOR) // Test for a colour change
{
if ( Use_Prim_Settings ) // Do we need to get the Prim's light settings?
{
get_prim_settings();
}
}
}
}