31 July 2019

20 August 2015

The setprimitivelightdata command can be used to set the light data for a primitive.

CommandRequired ParametersRequired Corrade PermissionsExample
setprimitivelightdatagroup, password, item, datainteract
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // set the light data of a primitive
            // in a 4 meter range named "Bulb"
            "command", "setprimitivelightdata",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "item", "Bulb",
            "range", 4,
            "data", wasURLEscape(
                wasListToCSV(
                    [
                        "Intensity",
                        1,
                        "Radius",
                        10
                    ]
                )
            ),
            "callback", wasURLEscape(URL)
        ]
    )
);
Optional ParametersPossible ValueDescription
rangeAn number representing meters.The spherical radius from Corrade to search the primitive in.

The command takes as parameter in data a CSV list of members of the LightData structure.

Notes