Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float delta=PI/500;
- vector centro;
- float raggio;
- float z;
- float fi;
- default
- {
- state_entry()
- {
- llSay(0, "Script running");
- llSensor("SOLE",NULL_KEY,PASSIVE | SCRIPTED,20,PI);
- }
- sensor(integer count)
- {
- centro=llDetectedPos(0);
- raggio=3; // llVecDist(llGetPos(),centro);
- z=centro.z;
- state ready;
- }
- no_sensor()
- {
- llSay(0,"Deve esistere un oggetto che fa da centro di nome SOLE");
- }
- }
- state ready
- {
- state_entry()
- {
- llSay(0,"Ready");
- llSay(100,"OFF");
- }
- touch_start(integer count)
- {
- llSay(100,"ON");
- fi=0; llSleep(2);
- for(fi=0;fi<2*PI;fi+=PI/180)
- {
- vector coord=centro+<raggio*llCos(fi),raggio*1.5*llSin(fi),0>;
- //llOwnerSay((string)fi);
- llSetLinkPrimitiveParamsFast(0,[ PRIM_POSITION , coord] );
- llSleep(0.1);
- }
- // llSetTimerEvent(0);
- llSay(100,"OFF");
- llSay(0,"Fine rotazione");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement