Jump to content

Moon Corrigible

Resident
  • Posts

    57
  • Joined

  • Last visited

Everything posted by Moon Corrigible

  1. Hmmmm.... OK here is my issue: You know how, if you use your arrow keys to rotate your avatar, there is a little bit of play there? If you start with your camera directly in back of your avatar you can use the arrow keys a little bit left or right without actually moving the avatar - this moves your camera around and changes the direction of "Forward" but not *exactly* where your avatar's nose is pointing. Put another way, if you use the arrow keys to rotate your avatar, and just tap them a couple of times, the camera moves but the avatar doesnt *quite* face in that direction until the imcrement gets big enough and then it turns the whole avatar a bit. If the camera is directly behind the pillow fort then the plungers fire out wonderfully forward and dahlek victory is assured (I'm such a nerd). But if I find I am off a little bit and just tap the arrow keys a couple of times - the plungers come out in the new 'Forward' direction but the turret is still facing in the original position. I do have an 'aim' command so I could easily just change the rotation of the turret alone to point to where the plungers will go. But with my previous code and this new code, when I try to translate the vector at which the plungers will fire into a rotation to set the turret to, I keep getting the turrets rotation in relationship to the root prim of the attached pillow fort (even though I thought the root prim was suppose to be the avatar for an attachment) when what I need is the rotational equivalent of forward for the avatar - not necessarily the attached object Now none of this is a big deal obviously - I'm firing plungers not solving world hunger *grin*. It just feels like I am missing something obvious.
  2. Oh that is brilliant!! You are the best thing since sliced bread!! I dont need or want it to be really accurate - I'm throwing plungers - hehehe. But I never would have thought of altering the direction the plunger is thrown in - I was too hyper focused on alterning the direction the pillow was pointing. Plus I was all sorts of confused about which rotation was which. Thank you so much!!!
  3. Clearly I am missing something. I want to be able to fire plungers from the bolster turret of my attached object pillow fort (obviously I am the height of maturity) and I want to avoid going into MouseLook to do so. To elaborate a little: the pillow fort is an attached object which initiates an animation. My avatar goes into an animation that *looks* like it is sitting but it does not actually sit - so I can roam around like a dalek in my pillow fort. (see - icon of maturity I tell you!). And my avatar is completely surrounded by pillows so seeing exactly which direction my nose is pointing is not really easy. The bolster turret is a child prim on the pillow fort - not the root prim of the attachment. I am using: Fire() { float speed = 10.0; vector pos = llGetPos() + (<1.5, 0, 0> * llGetRot()); vector vel = speed * llRot2Fwd(rot); rotation rot = llEuler2Rot(<0, 0, 270> * DEG_TO_RAD) * llGetRot(); llPlaySound("dalekgun", 1.0); llRezObject(bullet, pos, vel, rot, 0); } This fires the plungers just fine. But it seems to have little relation to the orientation of the linked, attached bolster turret. Sometimes it lines up perfectly, sometimes it doesnt. I would love to be able to reorient the bolster turret using llSetLinkPrimitiveFast. So what I need is to figure out how to translate llRot2Fwd into a rotation that I can apply to the child prim of an attachment (I assume using llSetLinkPrimitiveFast) Somehow I just can not see the forest for the trees on this so any help would be greatly appreciated! Thanks in advance!
  4. Have I told you lately how incredibly awesome you are Rollig! You so rock!! I know you're right. I still have that knee-jerk.. listeners are eeeevvviiiillllllll .. reaction but in this case it really does look like the lesser evil.
  5. OK now I'm really being dense. If I am using llRegionSayTo(key target, integer channel, string message) - I can not determine the key of the object I am sitting on from an attachment, so I would have to use a preset, hardcoded channel. Yes? And the chair would *have* to be listening on that particular hard coded channel the entire time anyone was sitting on it. (Not that big a deal I know but I try to eliminate lag where I can)
  6. Oh! And no much to my sadness llMessageLinked does not work between attached objects and objects you are sitting on. That was what I thought I was going to use when I started the whole thing. *eye roll*
  7. OK - to explain a little better - I made a bracelet that will control arms only animations. The easiest parallel is holding a baby. If theavatar standing or running or sitting in a different seat or doing virutally anything else I want it to play one animation. But if I am sitting in one particular chair I want it to play a different animation because it just looks prettier. (It isnt holding a baby by the way- lol). I made the chair and the bracelet and the animations so that is all good. I was just hoping for.. elegance -
  8. OK first off .. llEmail.. UBER cool!! Thank you!! But I need specific object keys to use it dont I? And if the avatar is already sitting on the chair then the chair cant figure out the attachments key, and the attachment cant figure out the objects key. ... I think.. am I missing something? Worse come to worst I can fall back on checking the name of the animation playing and using that. I dont *like* doing that because its a hefty list and it just feels inelegant and bulky. But I think it will work if I sledgehammer it into place. But either way I apprecaite the llEmail point... that is going to be HANDY!
  9. ..I .. have.. no idea! lol. I want the attachment to play one animation ('Hands Out') if the avatar is sitting on that particular chair and another ('Hands Folded') if it is doing anything else at all. I have never used llEmail so I have no idea how it works! Cool!! New stuff! I will play with it and let you know!!
  10. I know I should know this but my brain is *just* not wrapping around it. I from an attached object I am using: integer agentInfo = llGetAgentInfo(attached); if(agentInfo & AGENT_SITTING) { (Woo hoo I am a lady of leisure!) } To determine that my avatar is indeed sitting - and this works wonderfully! The problem is that I want to determine if my avatar is sitting on a particularly named chair - in this case 'MS Beta 1.0'. Using llSensor does not work (I tried) it always returns a no_sensor event - I am guessing because the radius is 0. (a sensor 1 m away picked up the chair just fine but my attached item returned a no_sensor). And the key could be about anything because I want it to work for whatever rez of the chair I have out there. So basically my question is: Is there any way for an attached object to determine the name of the item an avatar is sitting on without having to have listeners going all of the time? Thanks so much in advance!!
  11. *hangs head* I was working on it just before that big outage yesterday and didnt realize that the notecard never saved. It was that 0 lines problem that there is already a jira for. Doh! Sorry all!
  12. Ut oh.. it works when I use an old card but not when I use a newly created card. Thiiiiisss cant be good
  13. I may be loosing what little mind I had left. I used: state_entry() { string name = llGetInventoryName(INVENTORY_NOTECARD, 0); llOwnerSay(name); llGetNumberOfNotecardLines(name); } for the OwnerSay I got the message: [18:12] Conference Chair: ChairAdmins and I am getting the error message: Conference Chair: Could not find notecard 'ChairAdmins'. How is this even possible?! It can find it for the name but not the number?
  14. Oh my brain started working again... it hurts! it hurts! - hehehehee Having the object get the rotation from the avatar information is BRILLIANT and something I never would have thought of! Thank you!! And ..(how sad is this) .. I was thinking that i would have to script a runner to go out 10 m and then rez from there - or repeat however many times until it got within range and then rez. Having the pillow move to the person is SUCH a better idea! Thank you all so much!!!
  15. When I've done it I've used something like this: integer total = llGetListLength(a); //so you can add or subtract things to the list without changing the script integer chosen = llFloor(llFrand(a)); //you choose an random float that is less then the total, then round down - this will give you a number that is between 0 and 1 less then the total number of entries in the line. vector targetPos = llList2Vector(a, chosen);
  16. My brain stopped. :) I am making a rezzer which will create pillows for people to lay around and participate in a discussion. So far, it talks to the person to find out what sort of pillow they want, then does a sensor sweep to find out where they are standing (in case they moved after touching the object), and rezzes the type of pillow they want under their feet. That all works hunky dory peachy keen. So I know the global coordinates that the pillow is rezzed at. And I know the global coordinates that I would like the pillow to face (to have the x axis point toward). But for the life of me I can not figure out how to tell what rotation to rez the object at so that it faces those global coordinates. sensor(integer num_detected) { vector av_pos = llDetectedPos(0); vector size = llGetAgentSize(llDetectedKey(0)); float floor = (size.z + 0.05)/2; vector rez_pos = <av_pos.x, av_pos.y, av_pos.z - floor>; llRezAtRoot(chosen, rez_pos, llGetVel(), llGetRot(), dialogchannel); }
  17. Oh good point! I dont want to reset the juggler scripts because they are holding information. And they *should* have been turned off before going into the waiting state - I will have to check that. But I do want to reset the Permissions scripts. Thank you!!! I had no clue about the state change issue so I never would have figured that out on my own!
  18. Or perhaps a command that LSL actually has like .. ohhh llResetScript() even... (doh!)
  19. I never ever would have thought of the possiblity of linden labs turning something into a constant - I just make the ones I declare caps so I can see them easier - thank you! Yes, the script does have mutliple states..... oh my.. kick me in the head... You were right! That is the problem! I went back to see how many states I acutally had and realized where the problem is hitting: state WAITING { touch_start(integer num_detected) { llSay(0, "Restarting scripts, touch again for menu."); llSetScriptState("Permissions White", TRUE); llSetScriptState("Permissions Black", TRUE); llSetScriptState("Juggler", TRUE); llSetScriptState("Juggler Too", TRUE); llMessageLinked(LINK_SET, 0, "Restart", NULL_KEY); state default; } }  DOH!!! It does change states from a touch command! Would changing this to an llRestartScript() give me any unforeseen problems do you know?
  20. I did not know that about changing states so thank you! I did have to check it too because I wrote it so long ago but it doesnt: touch_start(integer total_number) { LISTENER_COUNTER = 0; if(llDetectedKey(0) != MENU_USER) { if(SECURITY == "Public" && llGetOwner() != MENU_USER) { CURRENT_MENU = MAIN_MENU_NO_PUBLIC; } else { CURRENT_MENU = MAIN_MENU; } CURRENT_CHATTER = MAIN_MENU_CHATTER; } GetClearance(llDetectedKey(0), CURRENT_MENU); if(CLEARANCE == TRUE) { MENU_USER = llDetectedKey(0); if(LISTENER == FALSE) { LISTENER = llListen(DIALOGCHANNEL, "", NULL_KEY, ""); llSetTimerEvent(60); } llDialog(MENU_USER, CURRENT_CHATTER, CURRENT_MENU, DIALOGCHANNEL); } } The GetClearance(llDetectedKey(0), CURRENT_MENU); function doesn't change a state either - just compares the current SECURITY setting with the detected key.
  21. I am completely mystified and dont know where to start looking. As near as I can tell when the sim resets my script seems to completely fail to recognize touch. It still says it is running, the script count is the same. but touching it does absolutely nothing until I reset the scripts manually. Then everything is fine. I am not on a private island so I cant just reset at will to test this. Any thoughts or advice at all?
×
×
  • Create New...