Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- key kT1 = "21eeb911-d57a-6a7b-44cd-b9d905860ac6";
- key kT2 = "fcf3ce95-b924-c340-6f16-7f8c25196b1d";
- key kT3 = "af80baaf-f7e1-c70b-2b1a-1faa6623d3a0";
- key kT4 = "00c3fd93-75fe-3e59-3323-5856256d96c2";
- list lFire = [kT1, kT2, kT3, kT4];
- key kTEXTURE_INVISIBLE = "bd7d7770-39c2-d4c8-e371-0342ecf20921";
- vector vREPEATS = <1.0, 1.0, 0.0>;
- float fTimer = 0.03;
- integer iStartCounter = 0;
- integer iCounter = iStartCounter;
- integer iMaxCounter = 3;
- integer iCHANNEL = 23498;
- string sSTART = "start fire";
- string sSTOP = "stop fire";
- string sTEXT = "Select an option:";
- integer iLISTEN;
- integer iCHANNEL_LOCAL = 23499;
- default
- {
- state_entry()
- {
- llListen(iCHANNEL_LOCAL, "", "", "");
- }
- touch_start(integer num_detected)
- {
- iLISTEN = llListen(iCHANNEL, "", llDetectedKey(0), "");
- llDialog(llDetectedKey(0), sTEXT, [sSTART, sSTOP], iCHANNEL);
- }
- listen(integer channel, string name, key id, string message)
- {
- llListenRemove(iLISTEN);
- if (message == sSTART)
- { //start fire
- if (channel != iCHANNEL_LOCAL)
- {
- llWhisper(iCHANNEL_LOCAL, sSTART);
- }
- llSetTimerEvent(fTimer);
- }
- else if (message == sSTOP)
- { //stop fire
- llSetTimerEvent(0.0);
- if (channel != iCHANNEL_LOCAL)
- {
- llWhisper(iCHANNEL_LOCAL, sSTOP);
- }
- llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TEXTURE, ALL_SIDES, kTEXTURE_INVISIBLE, vREPEATS, ZERO_VECTOR, 0.0]);
- }
- }
- timer()
- {
- key kTexture = llList2Key(lFire, iCounter++);
- llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TEXTURE, ALL_SIDES, kTexture, vREPEATS, ZERO_VECTOR, 0.0]);
- if (iCounter > iMaxCounter)
- {
- iCounter = iStartCounter;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement