Jump to content

chrixbed

Resident
  • Posts

    54
  • Joined

  • Last visited

Everything posted by chrixbed

  1. I try to apply this on all the prim that Avatar will sit on by modifying only llSitTarget() and not call the rotation for the prim it self. But his case is not working. rotation LinkedLookAt( vector Target){ rotation rotvec = llRotBetween(<0,1,0>,llVecNorm((Target - llGetPos()))); rotation rotbet = rotvec/llGetRootRotation(); llSetRot(rotbet); // return rotbet; return llEuler2Rot(<0.0,0.0,-PI/2>)*rotvec/llGetRot(); } default { state_entry() { list ListPosLocal = llGetLinkPrimitiveParams(1, [PRIM_POS_LOCAL]); llSetLinkPrimitiveParamsFast(1, [PRIM_TEXT, (string)["(Root)",llList2String(ListPosLocal,1)], <1,1,1>, 1]); llOwnerSay("Root Pos 2: " + llList2String(ListPosLocal,0)); vector posroot = llList2Vector(ListPosLocal,0); LinkedLookAt(posroot); // llSitTarget(<0.0, 0.0, 0.4>, LinkedLookAt(posroot)); // Too complex llSitTarget(<0.0, 0.0, 0.4>, ZERO_ROTATION/llGetLocalRot()); // More Simple way } }
  2. Yeah that work ! thanks! I'm always a bit confuse with rotation...
  3. I'm building an object with 6 pose ball that I want to look at the root. I can change the orientation of each pose ball but if I try to apply the calculated orientation to the pose ball the llSitTarget() seem not to follow that. What I'm doing wrong ? Here is the code I put in every Link Child Prim: rotation LinkedLookAt( vector Target){ rotation rotvec = llRotBetween(<0,1,0>,llVecNorm((Target - llGetPos()))); rotation rotbet = rotvec/llGetRootRotation(); llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_ROTATION, rotbet]); return rotbet; } default { state_entry() { // Get the Root Prim orientation list ListPosLocal = llGetLinkPrimitiveParams(1, [PRIM_POS_LOCAL]); // Tag the prim to identify it llSetLinkPrimitiveParamsFast( LINK_ROOT, [PRIM_TEXT, (string)["(Root)",llList2String(ListPosLocal,1)], <1,1,1>, 1]); // Change Prim Orientation to look at the Root vector posroot = llList2Vector(ListPosLocal,0); rotation LookRoot = LinkedLookAt(posroot); // Apply this orientation on the Sit Target llSitTarget(<0.0, 0.0, 0.4>, LookRoot); } }
  4. No worries Rolig, now I know what it's possible or not and move to something else๐Ÿ™‚
  5. Well I guess the only option is to delete it manually. Thanks Anna !
  6. Ok I just try llRetunObjectsByID(), I do own the land but is not working, anything I'm missing ? //Rez an object on touch string object = "ObjectB";//Object in inventory integer start_param = 10; rotation rot; list objects; // requierd to store UUID of the object to Delete/Return default { state_entry() { rot = llEuler2Rot(< 0, 90, 90> * DEG_TO_RAD); } touch_start(integer a) { vector vec = llGetPos() + < 0.0, 0.0, 5.0>; vector speed = llGetVel(); llRezAtRoot(object, vec, speed, rot, start_param); llSleep(5); llOwnerSay("Return Object now"); llRequestPermissions(llGetOwner(), PERMISSION_RETURN_OBJECTS); } run_time_permissions(integer perm) { if(PERMISSION_RETURN_OBJECTS & perm) { integer testerror; testerror = llReturnObjectsByID(objects); // Delete the Object objects = []; llOwnerSay("error: " + (string) testerror); // return 0, so must be fine. } } object_rez(key id) { llOwnerSay("Get Object UUID:" + (string) id); objects = [id]; } }
  7. Aww llReturnObjectsByID()!! that what I was looking for, you are the best Rolig ๐Ÿ™‚
  8. If I can't modify the rezzed object i.e. I can't add a listen() with a llDie() script in it. What are my options; delete it manually only ?
  9. I want to rez and "Object B" from a rezzer "Object A" and remove it after. I have the right to copy/delete and rez the "ObjectB" but not to modify it. Basically, I want to be able to rez a purchase objects on my land and be able to remove them from one single rezzer. How can I do this ? Note: I know that I can use llDie() into the rezzed object but I would like to do it from outside. Here is the code I try to use in the Object A (the rezzer): string object = "Object B";//Object in inventory with right to copy/transfert but not to modify integer start_param = 10; rotation rot; key Object_UUID; // key that store the UUID of the Rez object to use to delete it after DeleteObject(){ // This is the function I try to build which can be similar of llDie(); but outside of the rezzed object. // I can use the UUID of the Object from Object_UUID } default { state_entry() { rot = llEuler2Rot(< 0, 90, 90> * DEG_TO_RAD); } touch_start(integer a) { vector vec = llGetPos() + < 0.0, 0.0, 5.0>; // 5 meter above this vector speed = llGetVel(); if (on=!on) llRezAtRoot(object, vec, speed, rot, start_param); else DeleteObject(); } object_rez(key id) { Object_UUID = id; } }
  10. Wulfie, I just test it and OMG, that work so well !! This a very good example on how to use Bezier curve on multiple link set, wow!
  11. 100 prim with 100 script works well for me too, so that a good news! In term of explosion, I try to go to an easy path now and just add like 3 giant sphere to go through the group of prim to make things explode with the following physique: llSetStatus(STATUS_PHANTOM, FALSE); // Set the object physical llSetStatus(STATUS_PHYSICS, TRUE); // Set the object physical llSetPhysicsMaterial(GRAVITY_MULTIPLIER | RESTITUTION | FRICTION | DENSITY, 1,0.2,0.2,100.0); llMoveToTarget(llGetPos() + <0.0,0.0,30.0>, 0.1); // try to move the big sphere to kick the groups of prim to explode The 3 spheres are a bit too slow to react and do a good explosion job, any advice to make this better ?
  12. Very bold and interesting test! Since I'm making kind of live machinima on empty SIM, all my effect are temporary. So I'm not too concern to blow out resource for little visual burst which create a "wow" temporary effect. Thanks for those resource cues, very helpful !
  13. Wow that a killing; multiple script seem to be the issue here. Seem a bit crazy but I think there is a way to blow out multiple object with limited SIM impact... my quest is not over yet ๐Ÿ˜›
  14. That super good to know, I'm always afraid to use to many listen state. Do you think I consider a max of 2500 listen overall from all object in a SIM as a good gage ?
  15. That a very good workflow. that gave me hope I can do that object exploding thing ๐Ÿ™‚
  16. Your right, I discover that, so now I'm thinking to rez from attachment with an extra object on the side that will deal with the link/unlink and explosion effect. Is that make sense ?
  17. Yes you are right Wulfie about having a generic script that can parametrically calculate a Bezier curves to apply to all the individual prim. I start a short demo to frame the explosion of the link set using llMoveToTarget for now. Next step will be to apply KFM and Bezier and check memory usage as you suggest ๐Ÿ™‚ Let me know if you have some insight! here is the code I use: // Script to put in every individual objects and than link all those 100 objects together. Name the link set "BoomObjects" and put it into Rezzer Inventory integer listen_handle; default { state_entry() { listen_handle = llListen(-50, "", "", ""); } listen( integer channel, string name, key id, string message ) { if (message == "die"){ llListenRemove(listen_handle); llDie(); } if (message == "boom"){ // This part can be eventually replaced by KLM & Bezier llSetStatus(STATUS_PHYSICS, TRUE); // Set the object physical llMoveToTarget(llGetPos() + <0.0,0.0,10.0>, 1.0); // Move to a point 10 meters above the present position llSetPhysicsMaterial( GRAVITY_MULTIPLIER, -0.5 ,0.0, 0.0, 0.0 ); llSetPhysicsMaterial( GRAVITY_MULTIPLIER, 1.0 ,0.0, 0.0, 0.0 ); llSleep(5); llResetScript(); } } } // Script to put in every individual objects and than link all those 100 objects together. Name the link set "BoomObjects" and put it into Rezzer Inventory integer listen_handle; default { state_entry() { listen_handle = llListen(-50, "", "", ""); } listen( integer channel, string name, key id, string message ) { if (message == "die"){ llListenRemove(listen_handle); llDie(); } if (message == "boom"){ // This part can be eventually replaced by KLM & Bezier llSetStatus(STATUS_PHYSICS, TRUE); // Set the object physical llMoveToTarget(llGetPos() + <0.0,0.0,10.0>, 1.0); // Move to a point 10 meters above the present position llSetPhysicsMaterial( GRAVITY_MULTIPLIER, -0.5 ,0.0, 0.0, 0.0 ); llSetPhysicsMaterial( GRAVITY_MULTIPLIER, 1.0 ,0.0, 0.0, 0.0 ); llSleep(5); llResetScript(); } } }
  18. Using the trick to set the list of object as physical, unlink it and use small overlap position between object to generate a motion for explosion seem to be an interesting way. note: is https://www.outworldz.com/cgi/freescripts.plx?ID=52 the script you referring for prim animator?
  19. Thanks for the suggestion and yes particle system are great for explosion. But I want to explore something different with PRIM explosion. Ideally I would like to be able to construct and deconstruct structure with multiple prim effect.
  20. I have an object with like 100 links and is attached to an avatar. I want to make a kind of explosion by having all objects individually goes away on a random path and then come back to their original position. I try to use llSetKeyframedMotion() in each individual linked object but that only work for the root Prim and everything moves together. So here is my idea: From the root prim; save all UUID of the link set; Apply llBreakAllLinks() to free each link; From each individual object, apply a llSetKeyframedMotion with PING_PONG motion for each object with a random path (this action is called from a llisten() originate from the root prim); Stop the llSetKeyframedMotion after the path is completed; From the root link; re-link all objects with llCreateLink() using the UUID previously saved; Is that making any sense or is there a better (easier) way to do that ? Note: I'm a bit concerned about the number of llisten() I need to turn on to apply the llSetKeyframedMotion. Any help will be greatly appreciated, thanks!
  21. I test it using a listen() state that call llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_PLAY]); which is call from another prim and works like a charm; nobody seem to need to click on the prim anymore to start the video. I will do more test with more people but seem to be the solution. Thanks!
  22. Using a Prim to force the PARCEL_MEDIA_COMMAND_PLAY flag to force the media to start seem to be a good idea. But did I understand that you do not suggest to use llSensor() to detect an avatar. If not, how this prim can be trigged, by collision or something else ? Thanks !
  23. Did you guys find a way to start the video automatically without having the need for other people to click on it ?
  24. I set a Texture Media to a URL MP4 video on one face of a prim. I'm trying to find a way to activate the video without having the need of clicking on it. Is there anyone find a successful way to do that ? I would like to have this working for avatar came close to the video without having to tell them "click on the prim to start the video". NOTE: It seem that the flag PRIM_MEDIA_AUTO_PLAY set to TRUE is not enough. Here is the script I use in the prim: string URL = "www.whatevervideo.com/video.mp4"; default { state_entry() { llSetPrimMediaParams(0, [PRIM_MEDIA_AUTO_PLAY,TRUE, PRIM_MEDIA_CURRENT_URL,URL, PRIM_MEDIA_HOME_URL,URL]); } } Note: I also attach an image of my Media setup in Firestorm viewer. So, what options (coding, config in firestorm or anything else) is there to do that ? Thanks!
×
×
  • Create New...