Jump to content

poppy796

Resident
  • Posts

    14
  • Joined

  • Last visited

Reputation

3 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Just to let you all know, the problem is indeed solved. It was a permission problem. The solution is simple, add R=llGetRot();llSetRot(<0.0,0.0, R.z,R.s>); llSetTimerEvent(1.0); to the state entry event. it all works out perfectly Thank you all for your input. it really helped me a lot!!
  2. Brilliant thought! I'm going to try that right away. Thank you so much for your input. I never thought of that! 👍
  3. Hi Elleevelyn, the other avi is about the same length, the launcher (arrow) is not physical and phantom, so there are no ground collisions.
  4. Hi Qie, yes the launcher is linked to a so-called launch-tube. so the llMessageLinked, sends a message to the tube. The launcher however is the root prim. I experimented a bit. I added a timed correction on_rez(integer rz) { .... none relevant part ... R=llGetRot();llSetRot(<0.0,0.0, R.z,R.s>); llSetTimerEvent(1.0); } listen(integer chn, string name, key id, string msg) { if (chn==comm) { if (msg=="ROT") { llSetRot(llGetRot()*llAxisAngle2Rot(<0,0,1>, angle)); R=llGetRot(); } else if (msg=="Launch") llMessageLinked(Launcher,0,msg,""); } } timer() { llSetRot(<0.0,0.0,R.z,R.s>); } } This works too, for my avi. And also for other avi's. But! If I manually tilt the launcher (over y for instance) then with my avi it goes back to zero, but with other avi's it stays tilted. Again something I do not understand.
  5. Hi Frionil, Mouselook is not used, so that's not a topic. Besides I checked hud rotation vs launcher rotation and they are the same. The R, I explained in script parts: R=llGetRot(); llSetRot(<0.0,0.0, R.z, R.s>); so R is a rotation, the initial rotation of the rezzed launcher. and later on: llSetRot(llGetRot()*llAxisAngle2Rot(<0,0,1>, angle)); R=llGetRot(); the rotation around the z-axis.
  6. Thank you for your suggestion Profaitchickenz. It's an interesting thought which I checked immediately. However, rotation of hud and initial rotation of the rezzed launcher are exactly the same. it would have explained a possible inclination from the X-Y plane. But that didn't show. And my main concern is the apparent sudden turns around the z-axis.
  7. Thank you for your reply Elleevelyn, I do change ownership, like you suggested, but that doesn't change the phenomenon.
  8. Hi everybody, I've been working on a big project, and I'm proud to have solved most of the challenges. But I now have a 'small' challenge that puzzles me silly. What is the situation: I rez a launcher arrow from a hud. that works perfect. But, although I rez the object in a plane, it sometimes stands on the ground with a slight angle in x- or y direction (z=perpendicular to the ground). in order to correct this I do the following: R=llGetRot(); llSetRot(<0.0,0.0, R.z, R.s>); this places the object nicely parallel to the ground surface. Now I need to turn the launcher arrow (left or right) this works perfectly with llSetRot(llGetRot()*llAxisAngle2Rot(<0,0,1>, angle)); R=llGetRot(); So far no problem. But, at launch I want to make one final check to see if the object is still parallel with the X-Y plane with: if (cmd=="Launch") {llSetRot(<0.0,0.0,R.z,R.s>); llMessageLinked(Launcher,0,msg,"");} and now the trouble starts. If I do it myself (my avi) it works perfectly. It does exactly what I want. But if I give this to somebody else, the arrow randomly points to any other direction and of course the launch fails. I don't understand why that is. And I have no clue how to solve this. Does anybody have any suggestions as to what the reason is, but also how I can make this more robust?
  9. Thank you all for your suggestions. "Asking the question was answering it". For me, I've solved the problem. Hardly in an elegant way in my opinion but it works! Thank you all so much for your input!
  10. Hi all, I'm facing this awkward problem. I've created a golf hud. Part of the hud is a launcher, that carries a golf ball, that carries a ball marker. All these items are stacked like a matroyshka doll into eachother. The hud works perfectly, on me! When I give it to somebody else however they are faced with the fact that my permissions are still valid (cam permission, animation permission, general llGetOwner() permission). Each item (laucher, ball, marker) contains at least two scripts and I can never be sure which script is working right. Of course I added on_change events in all scripts but still either the change is too slow or it's not working at all. A golfball for instance is only rezzed during the launch and roll, for each new lauch a new golfball is rezzed. My question is: Does anybody know how to make a matroyshka doll like this clean of prior permissions? I think I've tried everything in the book, but I clearly need another book.
  11. Thank you Fenix. You helped me on both counts, although I'm still fumbling with the ribbon mask, but I will get that done. The launcher is working like a breeze now. You really put me on the right track!
  12. Sometimes I have problems with the rather cryptic descriptions of certain LSL functions. Being native dutch I truly don't understand them so I experiment a lot to see what the outcome is. Doing so I'm getting a fairly nice understanding of what everything does. This has resulted in some very good scripts. I'm a golf player, and like many players I use the Elite Golf system of Crowley Corp. Brilliant! But very (unnecessarily) 'heavy' on prims and scripts and it contains some flaws that makes really serious golf playing less possible. Crowley appears to be banned from SL so I took it upon me to make an entire new golf-hud myself. I'm pretty far, but now I stumble upon something that makes me tear my hair out....ouch! I've created a ball launcher. Pretty straightforward, it rotates on arrow touch towards the pin, rezzes a ball and lauches it on mouse click. For trial purposes I used a square ball, which makes me see the orientations of my lauched ball and also makes funny bounces when it hits the ground. The square ball works perfectly, even when I stand close to the launcher, ie, hit the ball with my club. So, time to launch a real ball.... making the square into a sphere, same script. And now at lauch it deviates to the right. Not much, but a couple of degrees, which is devastating when you hit a ball over 60 yards. It appears the sphere collides with my avatars bounding box(??? why didn't the square ball???). Solution: Make the ball phantom at launch. That seems to work, however my ball sinks through the ground. Apparently I'm not able to make it solid again in time, which is awkward, because I make it solid (llSetStatus (STATUS_PHYSICS,TRUE) after about 0.5 seconds. My assumption is that Physics overrides Phantom. Has anybody encountered this problem before and may come up with a possible solution? I've shot a gazilion balls sofar and I'm really desperate. While we're at it. I've noticed the Elite Golf Ball has a very fancy trailing system. It's not particles, but (flexi?) prims that follow the ball. I've been breaking my head over how to achieve that but I don't have a clue. Does anybody have any ideas on that?
  13. Thank you Molly! You lead me to a workable solution. Once I detect a RLV relay I switch state, determine outfit and huds and then switch back to default. It works brilliantly!
  14. Hi all, I started this topic because I'm stuck. I've been trying to make a comprehensive RLV trap. That means in one single script I've written (RLV) procedures that I can call in a main procedure called SequenceOfEvents() Most (simple) RLV procedures like force sit, TPAllow and such work perfectly because they directly act on the RLV Relay. Others require some polling, which means the initial procedure itself requests status info from the relay via a listen channel and first then act upon it (after listen). And that's where it goes wrong. Somehow I can't seem to control when a listen occurs, when my code acts upon that event and feeds back to the main procedure. I realise the story is a bit complex so let me try to explain with a piece of code: // RLV procedures (examples) RLVSend(string command){llRegionSay(RLVC,"cmd,"+(string)target+","+command);} SitLock(string i){if(i=="y")RLVSend("@unsit=n"); else RLVSend("@unsit=y");} TPAllow(string i){RLVSend("@tplm="+i+"|@tploc="+i+"|@tplocal:10="+i+"|@tplure="+i);} // above procedures work perfectly, even in sequence....but: DetachHUDs(){exthandle=llListen(Extchannel+1,"",tobject,""); RLVSend("@getattach="+(string)(Extchannel+1));} CurrentOutfit(){exthandle=llListen(Extchannel,"",tobject, "");RLVSend("@getinvworn:"+Clothes_Folder+"/="+(string)Extchannel);} Undress(string i){if (i=="All") i=""; RLVSend("@detachall:"+Clothes_Folder+"/"+outfit+"/"+i+"=force"); if (i=="Upper"|| i=="") RLVSend ("@attachall:"+On+"/Upper"=force");} //above procedures don't work in sequence and I don't understand why... SequenceOfEvents(string trgt) {CurrentOutfit(); DetachHUDs; Undress("Upper");} //now this doesn't work because CurrentOutfit() gives me the outfit name way after Undress() ?? listen (integer chn, string user, key id, string msg) { if (chn==Extchannel) { llListenRemove(exthandle);integer i; integer teller=0; integer pointer; list temp0=llParseString2List(msg,[",","|"],[]); for (i=0; i<llGetListLength(temp0); i+=2) if (llList2Integer(temp0,i)>teller) {teller=llList2Integer(temp0,i); pointer =i;} outfit = llList2String(temp0,(pointer-1)); } if (chn==(Extchannel+1)) { llListenRemove(exthandle);integer teller; for (teller=31; teller<39; teller++) //31 tot 39 is hud attachment posities {if((integer)llGetSubString(msg,teller, teller)) RLVSend("@detach:"+llList2String(atc,(teller-31))+"=force");} } Does anyone has any ideas what I'm doing wrong and how I can resolve it? I appreciate any help.
×
×
  • Create New...