Search the Community
Showing results for tags 'sit'.
-
This seems to be a settings issue. Several months ago, something happened with my account to corrupt settings of some sort and I've been suffering with this problem since. When I'm standing, my hover height is adjusted so that I just touch the floor. No problem. BUT - when I sit on anything, furniture, any type of stationary or animation poseball - just sitting on anything.....my avatar winds up lower than it should be. Way lower - down inside of the furniture. We normally have to tweak our sits, but this is way beyond tweaking. I have to use my hover slider to get myself up to the correct position on a piece of furniture, or out of the floor to the right dancing height on a poseball, etc. THEN I have to re-lower my hover height to the floor when I stand up again. This isn't supposed to happen and it never has before in the almost 9 years I've been in SL. This is a new problem that I don't know how to fix since I don't know what went out of whack. So basically, my "sit" height stopped matching my stand height. Are there any programmers out there who've seen this before and have an idea how it can be fixed? Thanks in advance!
-
I'm trying to get a boolean value for whether or not I am seated on an object not counting the ground.
-
I'm looking to unseat everyone who sits on a particular object except for the first person to sit on it.
-
Hello! I need to make an object that starts to vibrate when an avatar sits on it and it plays animation. I found such a script of vibration and animation, but how should they be combined together? vibration integer k; integer flip = 1; list params; vector pos; integer link = 0; default { state_entry() { params = llGetLinkPrimitiveParams(link, [PRIM_POSITION]); pos = llList2Vector(params, 0); } touch_start(integer total_number) { if (k = !k) llSetTimerEvent(0.02+llFrand(0.1)); else llSetTimerEvent(0.0); } timer() { llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_POSITION, pos + ((flip = -flip) * < 0.02, 0.01, 0.01 > )]); } } animation string animation; // the first animation in inventory will automatically be used // the animation name must be stored globally to be able to stop the animation when standing up default { state_entry() { // set sit target, otherwise this will not work llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION); } changed(integer change) { if (change & CHANGED_LINK) { key av = llAvatarOnSitTarget(); if (av) //evaluated as true if not NULL_KEY or invalid llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION); else // avatar is standing up { if (animation) llStopAnimation(animation); // stop the started animation llResetScript(); // release the avatar animation permissions } } } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { animation = llGetInventoryName(INVENTORY_ANIMATION,0); // get the first animation from inventory if (animation) { llStopAnimation("sit"); // stop the default sit animation llStartAnimation(animation); } } } }
-
i hope when AVsitter is released i can just play with that, untill then - rez 2 boxes, link em and put this script in the child. if i sit on the child and click that box, it moves my avatar, ... and is supposed to renew the sitTarget, but when i stand and sit back down, the sit target is way off? tried everything i can think of thanx for any advice, X vector sitPos; vector sitRot; integer avLink; string anim ; list local; vector mypos; rotation myrot; rotation R_avRot; rotation V2Rrot; updateSitTrg(integer link,vector avPos, vector avRot) { key user = llAvatarOnLinkSitTarget(LINK_THIS); vector size = llGetAgentSize(user); R_avRot = llEuler2Rot(avRot * DEG_TO_RAD ); if(size) { local = llGetLinkPrimitiveParams(link, [PRIM_POS_LOCAL, PRIM_ROT_LOCAL]); ; mypos = llList2Vector(local,0); myrot = llList2Rot(local,1); mypos += avPos; myrot *= R_avRot; mypos.z -= ( (size.z/2) - 0.375 ); // height adjust? llSetLinkPrimitiveParamsFast(link, [PRIM_POS_LOCAL, mypos , PRIM_ROT_LOCAL, myrot ]); llOwnerSay("\n Sit Target after: \nPosition - " + (string)mypos + "\nRotation - " + (string)myrot); llLinkSitTarget(LINK_THIS,mypos * myrot , myrot); } } default { state_entry() { sitPos = <0.0, 0.0, 0.5>; sitRot = <0.0, 0.0, 0.0>; V2Rrot = llEuler2Rot(sitRot * DEG_TO_RAD ); llLinkSitTarget(LINK_THIS,sitPos, V2Rrot); } touch_start(integer total_number) { llOwnerSay("\n Sit Target before: \nPosition - " + (string)mypos + "\nRotation - " + (string)myrot); // sitPos += <0.05, 0.0, 0.0>; sitRot += <0.0, 0.0, 10.0>; updateSitTrg(avLink,sitPos,sitRot); } changed(integer change) { if (llAvatarOnSitTarget() != NULL_KEY) { llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION); llSetClickAction(CLICK_ACTION_TOUCH); avLink = llGetNumberOfPrims(); } else { llSetClickAction(CLICK_ACTION_SIT); avLink = 0; } } run_time_permissions(integer perm) { anim = llGetInventoryName(INVENTORY_ANIMATION, 0); if (anim != "") { llStopAnimation("sit"); llStartAnimation(anim); } } }
-
Hello! I want to create a script that allows you to play different sounds with each animation (e.g. running, walking, swimming...) based on the simple walker script. How it should look like? Is it possible to assign a separate sound for each animation with such script? Perhaps you will advise to be based on another script? Thank you. Here is the script on which I'm based: string walk_sound = "34eae688-8b2d-d86c-5c1e-4e3eb865ca0d"; string stop_sound = "81603357-2b3c-bc7a-5d15-eb20fcca22a1"; string run_sound = "b1c0f5e2-45e5-e0b2-926a-fd60520ed4ee"; float volume = 1.0; integer i = TRUE; key owner; default { state_entry() { llSetTimerEvent(.3); } timer() { string anim = llGetAnimation(llGetOwner()); if ((anim == "Walking") || (anim == "CrouchWalking")) { llLoopSound(walk_sound,volume); i=FALSE; } else if ((anim == "Running")) { llLoopSound(run_sound,volume); i=FALSE; } else { llStopSound(); if (i == FALSE) { llTriggerSound(stop_sound,volume); } i=TRUE; } } }