Eiji Mayo
Registered User
Join date: 5 Jun 2007
Posts: 79
|
06-10-2007 15:16
Hi. I am making a gadget that goes on your wrist like a Bangle... I have an object I made inside it... In the Bangle's code I typed: ------------------------------------------------------------------------------------ //if "drop telecrystal" = true then say so and drop it... if( command == "drop telecrystal" ) { llWhisper(0, "BANGLE: 'Dropping TeleCrystal now..."  ; llRezObject("TeleCrystal", position, position, 0, string param); } ------------------------------------------------------------------------------------- Where 'String param' is what do I put? Any help would be most appriciated. Thanks, Eiji Mayo
|
Aleister Montgomery
Minding the gap
Join date: 30 Apr 2006
Posts: 846
|
06-10-2007 15:22
An example: llRezObject("nameofsomething", llGetPos() + <-0.1,0,-0.529>, ZERO_VECTOR, ZERO_ROTATION, 42); ZERO_VECTOR equals <0,0,0>, ZERO_ROTATION equals <0,0,0,0>. You could specify other values here as well, to get a certain rotation relative to the rezzer for example (in that case I'd offset it like the position, adding a rotation value to llGetRot()). "llGetPos() +" can be left out, if you always want the object to be rezzed at a specific location and not at a position relative to the rezzer. Don't ask me what the 42 stands for  I copied it once from an LSL Wiki example, and use 42 ever since. It's the answer to the ultimate question, according to D. Adams, so it can't be wrong. Edit: when the rezzer is worn and the rezzed object is meant to appear on the ground, be careful with the Z offset (the -0.529 in my example above). If it works for a tall avatar, it could end up under the floor when it's used by a small avi.
|
Eiji Mayo
Registered User
Join date: 5 Jun 2007
Posts: 79
|
06-10-2007 15:33
I think it worked... I am using LSLEditor so I can work on the script more flexably, so I can't attach items, but I am not getting the same script error message, thanks. I really appreciate your help. SL crashed on me again so I have to re-login to test it(-_-);
|
Eiji Mayo
Registered User
Join date: 5 Jun 2007
Posts: 79
|
06-10-2007 15:43
KOOL! It compiled and saved in SL! I ran into a problem though... The whole code works in LSLEditor, but when I put the Bangle on it doesn't do anything:/. Is there a special code snippet I have to use for an item that is attached to you??? It uses typed commands
|
Eiji Mayo
Registered User
Join date: 5 Jun 2007
Posts: 79
|
06-10-2007 16:50
I can't add a script while it's attached to me. sorry.... It worked and I can rez the crystal infront of me!(^_^) Thank you so much for the help.
I have one more question: I hate to be such a pain, but how do I go about detecting whether or not the crystal is on the rezzed, before I teleport to it. Then if it is not rezzed cancel action and tell me that it is not there?
|