X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=huffware%2Fhuffotronic_tools_n_testers%2FMinute_Hand_v0.4.txt;fp=huffware%2Fhuffotronic_tools_n_testers%2FMinute_Hand_v0.4.txt;h=76b517a3700ecbc6562f7a9fce45a77f585614f4;hb=0d8edb6dc63fa915c775b005830084935f75174c;hp=0000000000000000000000000000000000000000;hpb=29190d88923f6281801872a80811faf6c2d7943e;p=feisty_meow.git diff --git a/huffware/huffotronic_tools_n_testers/Minute_Hand_v0.4.txt b/huffware/huffotronic_tools_n_testers/Minute_Hand_v0.4.txt new file mode 100755 index 00000000..76b517a3 --- /dev/null +++ b/huffware/huffotronic_tools_n_testers/Minute_Hand_v0.4.txt @@ -0,0 +1,41 @@ + +// huffware script: minute hand, modified by fred huffhines. +// +// noticed this in arcadia asylum's great hobo cuckoo clock. +// this script is licensed by Beezle Warburton: +// "I released those 'into the wild' years ago,do what you like, +// I just ask that people don't resell the scripts by themselves." +// +// fred's changes licensed by: +// this script is licensed by the GPL v3 which is documented at: http://www.gnu.org/licenses/gpl.html +// do not use it in objects without fully realizing you are implicitly accepting that license. +// + +integer time; +integer hours; +integer minutes; + +float anglehours; +float angleminutes; + +default +{ + state_entry() { if (llSubStringIndex(llGetObjectName(), "huffotronic") < 0) state real_default; } + on_rez(integer parm) { state rerun; } +} +state rerun { state_entry() { state default; } } + +state real_default +{ + state_entry() { + // we want to calculate once a minute. + llSetTimerEvent(60.0); + } + + timer() { + time = (integer)llGetGMTclock(); // seconds since midnight + minutes = (time % 3600) / 60; + angleminutes = -(TWO_PI * (float)minutes / 60); + llRotateTexture(angleminutes, ALL_SIDES); + } +}