Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

object rezzer

scubadiver Albert
Registered User
Join date: 8 Oct 2006
Posts: 24
10-19-2006 11:23
What is the script that allows one object once clicked to rez another but that if i rezzed say a bridge it would always rez to the direction the front of the rezing object is.

does anyone have a script for that?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
10-19-2006 15:25
I'm not sure I understand your question but I think you are jsut talking about llRezObject

Just pass it the rotation required.
scubadiver Albert
Registered User
Join date: 8 Oct 2006
Posts: 24
10-20-2006 08:00
what number do itype to make it rez in front of the object no matter what way round it is?
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
10-20-2006 08:24
From: scubadiver Albert
what number do itype to make it rez in front of the object no matter what way round it is?
Can't think that way - rotations aren't straightforward (Oh! The punnage!)

Assuming that if both objects are facing the same way when you built them (IE, both root prims have identical rotations, the rezzer and the rezzed):

llRezObject("Object", llGetPos() + (<1.0, 0.0, 0.0> * llGetRot()), llGetRot(), 0);

Will rez the Object one meter "in front" (ie, along the local X axis) of the rezzer. You can adjust the X, Y and Z values of the vector to adjust precisely where the object is rezzed.
_____________________
scubadiver Albert
Registered User
Join date: 8 Oct 2006
Posts: 24
10-21-2006 12:03
shall i post the script on here and let you have a look at what needs to change?
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
10-21-2006 12:52
From: scubadiver Albert
shall i post the script on here and let you have a look at what needs to change?
Probably best, yes.
_____________________
scubadiver Albert
Registered User
Join date: 8 Oct 2006
Posts: 24
10-21-2006 13:18
here it is. if you have a better one post it. if you don't please correct this one and post it.

default
{
touch_start(integer total_number)
{
string object_to_rez = llGetInventoryName(INVENTORY_OBJECT,0);
llSay(0, "Rezzing - " + object_to_rez);
llRezObject(object_to_rez,llGetPos() + <0,0,1>,ZERO_VECTOR,ZERO_ROTATION,1);
}
}
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
10-21-2006 13:25
Combining your script with Jillian Callahan`s modification, we get this:
CODE
default {
touch_start(integer total_number) {
string object_to_rez = llGetInventoryName(INVENTORY_OBJECT,0);
llSay(0, "Rezzing - " + object_to_rez);
llRezObject("Object", llGetPos() + (<1.0, 0.0, 0.0> * llGetRot()), llGetRot(), 0);
}
}
scubadiver Albert
Registered User
Join date: 8 Oct 2006
Posts: 24
10-21-2006 13:29
and this will rez the object once clicked forwards with the object that rezzed it no matter where it moves. tommorow i will test it on my tank.

thanks for help
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
10-21-2006 13:35
From: scubadiver Albert
and this will rez the object once clicked forwards with the object that rezzed it no matter where it moves.
I hope so.
From: scubadiver Albert
tommorow i will test it on my tank.
Good luck!
From: scubadiver Albert
thanks for help
You`re welcome.
scubadiver Albert
Registered User
Join date: 8 Oct 2006
Posts: 24
10-22-2006 02:08
doesn't work errors in script please rewrite as best as possible
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
10-22-2006 02:56
From: scubadiver Albert
doesn't work errors in script please rewrite as best as possible



Need to specify a velocity as third parameter.

CODE
default 
{
touch_start(integer total_number)
{
string object_to_rez = llGetInventoryName(INVENTORY_OBJECT,0);
llSay(0, "Rezzing - " + object_to_rez);
llRezObject("Object", llGetPos() + (<1.0, 0.0, 0.0> * llGetRot()),<0,0,0>, llGetRot(), 0);
}
}
scubadiver Albert
Registered User
Join date: 8 Oct 2006
Posts: 24
10-22-2006 03:51
volocity for what how quick it rezs?
scubadiver Albert
Registered User
Join date: 8 Oct 2006
Posts: 24
10-22-2006 03:57
its works but now i gotta rebuild the bridge cos i messed it up

Thank you for your help in my problem!
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
10-22-2006 04:47
From: scubadiver Albert
volocity for what how quick it rezs?


LOL, no just the velocity of the prim when rezzed, i.e. initial velocity. I could/should have used ZERO_VECTOR which would then match your initial post more accurately