Jump to content

Dora Gustafson

Advisor
  • Posts

    2,120
  • Joined

  • Last visited

Everything posted by Dora Gustafson

  1. That is just about right If you had taken time to investigate you might have found out that the function can check for more than just one flag The flag PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS tells if group members can rez and create This is valuable combined with a check for avatar in parcel group and activated :smileysurprised::smileyvery-happy:
  2. What we have is llGetParcelFlags() Use PARCEL_FLAG_ALLOW_CREATE_OBJECTS This will not cover all kind of relationships like 'in group' and group permissions :smileysurprised::smileyvery-happy:
  3. Resizing on axis individually in a linked object is problematic It can only be done if all linked prims have axis parallel to the root prim's axis (it need not be the same axis as long as they are parallel) I know because I made this One Dimensional Scaling Tool You choose one axis and scale it, then the next and finally the third axis :smileysurprised::smileyvery-happy:
  4. The value of dp will always be in the range -1.0 ≤ dp ≤ 1.0 where 1 is facing, -1 is facing away and 0 is 'side to target' :smileysurprised::smileyvery-happy:
  5. vector avPos = llGetPos();rotation avRot = llGetRot(); // some of the previous posts deal with the avatar rotation which is worth some considerationsvector targetPos; // find this with sensor or whatever// Now compute two unit vectorsvector facing = llRot2Fwd( avRot);vector target = llVecNorm( targetPos - avPos);// finaly compute the dot product of both vectorsfloat dp = facing*target; // ( this is the same as cosinus to the angle between the vectors!! look it up:) )if ( dp == 1.00 ) // you are facing target exactly// since vi operate in floats and want something not perfct to be accepted, use something smaller than one// like:if ( dp >= 0.95 ) // you are facing target :smileysurprised::smileyvery-happy:
  6. You don't even have to use a script to play with these features Make a small sphere ( a bullet ) and edit:  With a restitution = 0 and a high friction the prim does not bounce but stays almost where it lands :smileysurprised::smileyvery-happy:
  7. Invisi prims were supported until recently except in advanced lighting.mode Invisi prims are used in many boats to keep water out :smileysurprised::smileyvery-happy:
  8. Just installed the latest viewer and invisi prims are not invisible anymore but grey chunks Is this a new feature? Second Life 4.0.2 (312269) Mar 9 2016 16:36:13 (Second Life Release) Release Notes You are at 24.0, 86.6, 20.8 in Breadnut located at sim10770.agni.lindenlab.com (216.82.56.60:13011) SLURL: http://maps.secondlife.com/secondlife/Breadnut/24/87/21 (global coordinates 174,616.0, 309,079.0, 20.8) Second Life Server 16.02.17.311134 Retrieving... CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (3392.29 MHz) Memory: 8174 MB OS Version: Microsoft Windows 8 64-bit (Build 9200) compatibility mode. real ver: 10.0 (Build 10011) Graphics Card Vendor: NVIDIA Corporation Graphics Card: GeForce GTX 660/PCIe/SSE2 Windows Graphics Driver Version: 10.18.0013.6175 OpenGL Version: 4.5.0 NVIDIA 361.75 libcurl Version: libcurl/7.38.0 OpenSSL/1.0.1h zlib/1.2.8 J2C Decoder Version: KDU v7.2 Audio Driver Version: FMOD Ex 4.44.31 LLCEFLib/CEF Version: 1.5.3-(CEF-WIN-3.2526.1347-32) Voice Server Version: Not Connected Built with MSVC version 1800 Packets Lost: 2,585/156,511 (1.7%) :smileysurprised::):smileyvery-happy:
  9. That is not even remotely the same I suggested Take another look :smileysurprised::smileyvery-happy:
  10. Take a look at LlSetPhysicsMaterial() and its parameters Some time ago I manged to make a bullet 'stick' to where it hit just by changing parameters in this function I can't remember exactly how, but it must have been Friction and Restitution I changed :smileysurprised::smileyvery-happy:
  11. Or this? list agents= llGetAgentList(AGENT_LIST_PARCEL, []);integer i = llListFindList( agents, [llGetOwner()]);if ( i > -1 ) agents = llDeleteSubList( agents, i, i); :smileysurprised::smileyvery-happy:
  12. I'm happy we can agree on this one and happy you realize the complexity of the problem Sometimes things are not as simple as they look at first glance Scripting is tricky Keep up the good work :smileysurprised::smileyvery-happy:
  13. steph Arnott wrote: This is the OPs and by agent chat on channel 7 and not by an object. " But how to restric this script to owner only. (The sound will play only when something that belongs to owner emits the message." Something that belongs to the owner is an object An object and an Avatar do NOT have the same id, so when you filter for the Avatar id only, no messages with any other id comes through and nothing that belongs to the owner can trigger the sound :smileysurprised::smileyvery-happy:
  14. When you filter for owner no messages from owner's objects will come through the filter This is what you do, so it is no wonder the OP didn't make it work :smileysurprised::smileyvery-happy:
  15. Because that was what the OP asked for The op wanted his/her objects and no other objects, to trigger sound by chat :smileysurprised::smileyvery-happy:
  16. If llListen is filtering anything but the what is said by the owner then nothing said by objects (owned by owner or otherwise) will trigger the listen event :smileysurprised::smileyvery-happy:
  17. Note that if ( llGetOwnerKey( id) == llGetOwner() ) is not the same as if ( id == llGetOwner() ) :smileysurprised::smileyvery-happy:
  18. Try this instead: // www.lsleditor.org by Alphons van der Heijden (SL: Alphons Jano)integer listener;integer channel = 7;string msg = "play";string soundName = "sound";default{ state_entry() { listener = llListen(channel,"","",msg); } listen(integer channel, string name, key id, string message) { if ( llGetOwnerKey( id) == llGetOwner() ) llPlaySound(soundName,1.0); }} Will only play on messages from an object with same owner :smileysurprised::smileyvery-happy:
  19. For what it is worth: the state_entry event has priority over other events A state_entry event on the event queue will be the event to handle first :smileysurprised::smileyvery-happy:
  20. I think it is on the release candidate server Le Tigre only this week but soon :smileysurprised::smileyvery-happy:
  21. I have also some difficulties getting the meaning What is a slave script? Maybe a script in a child prim and then the master script would be a script in the root prim? The only attributes I know about that can stick are prim attributes Is that what you refer to when you talk about script attributes? :smileysurprised::smileyvery-happy:
  22. The spinrate (used here and for llTargetOmega) is how many radians per second the spin is Say: one rotation per second gives a spinrate = 2π/1; [rad/second] The KFM use a time which you get by: 2π/spinrate = 1 [second] Since a full circle is composed of three parts the time for each part is (2π/3)/spinrate = ⅓ [second] KeyFramedOmega( vector axis, float spinrate){ llSetKeyframedMotion( [], []); if ( spinrate ) { if ( spinrate < 0 ) v = -v; list L = [llAxisAngle2Rot( axis/llGetRot(), v), ]; llSetKeyframedMotion( L+L+L, [KFM_DATA, KFM_ROTATION, KFM_MODE, KFM_LOOP]); }} I hope this makes it more clear :smileysurprised::smileyvery-happy:
  23. Of course Rolig:) Another difference you pointed out is in the way the rotation is calculated. I chose llAxisAngle2Rot because I made a function to replace llTargetOmega This function takes exactly the same parameter values as llTargetOmega but use no 'gain' parameter :smileysurprised::smileyvery-happy:
  24. There is a good reason for using 120° parts This way the rotation direction is given in a none ambiguous way I experienced that with 180° parts the prim would sometimes spin one way and sometimes the other Instead of ½ I decided to use ⅓ of a full circle :smileysurprised::smileyvery-happy:
  25. I can't believe this is your first script, so well polished There must be quite a few more first scripts in your waste bin :smileysurprised::smileyvery-happy:
×
×
  • Create New...