Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer CMD_CH = -1024;
- integer steps = 10;
- float counter = 0;
- float fRateIncrease = 0.1;
- float fMinRate = 0.0;
- float fMaxRate = 1.0;
- vector kleur;
- glow()
- {
- llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_GLOW, ALL_SIDES, counter]);
- }
- default
- {
- state_entry()
- {
- llListen(CMD_CH, "", "", "");
- llSetTimerEvent(0.022);
- llSetAlpha(0.0, ALL_SIDES);
- llSetPrimitiveParams([PRIM_POINT_LIGHT, FALSE, <0,0,0>, 0.514, 5.000, 0.250]);
- }
- listen(integer ch, string name, key id, string msg)
- {
- list items = llParseString2List(msg, [","], []);
- string command = llList2String(items, 0);
- vector colorcode = (vector)llList2CSV(llList2List(items,1, -1));
- list items1 = llParseString2List(msg, [","], []);
- string command1 = llList2String(items1, 0);
- if (id != llGetOwner() && llList2Key(llGetObjectDetails(id, [OBJECT_OWNER]), 0) != llGetOwner())
- {
- return; //Owner only.
- }
- if(command = "color"){
- llSetColor((vector)colorcode, ALL_SIDES);
- // llSay(0,(string)msg);
- llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, colorcode, 0.514, 5.000, 0.250]);
- kleur = (vector)colorcode;
- }
- if(command1 == "glowup")
- {
- llSetAlpha(1.0, ALL_SIDES);
- llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, kleur, 0.514, 5.000, 0.250]);
- counter = counter + fRateIncrease;
- }if (counter > fMaxRate)
- {
- counter = fMaxRate;
- }
- if(command1 == "glowdown")
- {
- counter = counter - fRateIncrease;
- }if (counter < fMinRate)
- {
- counter = fMinRate;
- llSetAlpha(0.0, ALL_SIDES);
- llSetPrimitiveParams([PRIM_POINT_LIGHT, FALSE, colorcode, 0.514, 5.000, 0.250]);
- }
- }timer()
- {
- glow();
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement