// empupate vector sitRot = <0,-90,0 > ; vector sitPos = <0.1,0,-0.1>; integer gListenerNumber; setup() { vector s = llGetScale(); sitPos.z = -s.z/4; llSetSitText("Empupate"); llSitTarget(sitPos, llEuler2Rot(sitRot * DEG_TO_RAD)); // needed for llAvatarOnSitTarget to work // turning... llTargetOmega(<0,0,1>,0.3,1); llSetTimerEvent(1); } default { state_entry() { setup(); } touch_start(integer n) { setup(); } on_rez(integer start_param) { setup(); } changed(integer change) { // something changed if (change & CHANGED_LINK) { // and it was a link change key av; av = llAvatarOnSitTarget(); if (av != NULL_KEY) { // somebody is sitting on me llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION); // let them dangle. :) llStopAnimation("sit"); llStartAnimation("empupaed2"); } else { // they stood up } } } timer() { if(llFrand(10) > 8) llSetText("Empupate",,1); else llSetText("",ZERO_VECTOR,0); integer i = 2 + (integer)llFrand(20); while(i--) { llSetAlpha(llFrand(.6)+.4,0); // llSleep(.1); } llSetAlpha(1,0); llSetTimerEvent(.1 + llFrand(3)); } }