llRezObject questions
|
|
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
|
03-11-2006 14:47
I am trying to implement llRezObject in a linked set, but am having problems.
1. It seems that when I try to call llRezObject from a child prim, it does not rez the object, but passes over the code. When I unlink, it rezzes just fine. Is this normal? Is there a way around it?
2. When I rez the object (assuming I can fix the problem in #1), how do I make it part of the linked set? I would like to be able to llMessageLinked to the rezzed object, then through a script in it, delink and die. I would rather avoid llwhisper and the like.
Thank you. Baron
|
|
Starax Statosky
Unregistered User
Join date: 23 Dec 2003
Posts: 1,099
|
03-11-2006 16:01
That's odd. I don't have problems rezzing objects from child prims. But before you get in deep. I'm wondering if it would be easier to link a transparent version of the object to your main object. Then use llMessageLinked() to tell the object's prims to make themselves opaque. This should give you the same result. That's the way I do it anyway, but I'm not exactly a scripting genius so don't trust me! 
|
|
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
|
03-11-2006 20:51
Now why didn't I think of that? That would just seem so obvious. The one downside is that it adds to prim count, and since this entire object might be used several times in an area, it would add several prims, it might not be too bad. I'll continue to evaluate both options-- one for ease of programming, and one for the challenge!
Baron.
|
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
03-11-2006 21:04
Just a foolish suspicion.  If the root prim was up side down, the positon of rezzing object might be under ground?  aww... you've solved it.  Sorry, I didn't read the new article. 
_____________________
 Seagel Neville 
|
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
03-11-2006 21:14
How far away are you rezzing the object? It may be that llRezObject is trying to impose its 10m distance restriction, but is using two different origin points when the rezzor is linked vs. when it's not. Even though Starax's solution may be prim intensive, its worth considering. PERMISSION_CHANGE_LINKS (needed for llCreateLink and llBreakLink), last I used it, was very flaky - sometimes it went poof when the object owner left the sim or logged out. Then again, last I used it was back in beta, to get around the forced modify-permissions llRezObject used to activate  ==Chris
|
|
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
|
03-12-2006 06:18
I'll have to check the orientation of the root prim. I think it is normally oriented. And, though I have slept since then, I think I checked the prim count on the land and it did not go up. I was trying to rez at a vector of <0,0,1> away, so I know that the 10m limits should have had no bearing.
I also noted that one time I had the whole prim selected to edit so that I could unlink it, but for some reason as I clicked on the pertinent child prim to deselect it, a) I could not unlink the whole thing and b) the scripted responded to the touch and rezzed the prim above it. I am still not quite sure of what happened, and have not replicated it.
Will keep trying, though. Baron
|
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
03-12-2006 06:23
Usually, I write the vector like this, llGetPos() + <0, 0, 1>.
_____________________
 Seagel Neville 
|
|
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
|
03-12-2006 14:26
I was finally able to get on and try a couple of things. I had called llRezObject at the vector llGetLocalPos() + <0,0,1>. I used GetLocalPos because it was in a child prim. When it was a child prim, this did not work. When I changed it to llGetPos(), it worked even when the script was in a child prim, and it rezzed the object in question *over the child prim, not the root prim of the linked set*. Does this behavior seem strange to anybody else, or is my mind just not wrapping itself around this function?
Baron
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
03-12-2006 14:54
From: Baron Hauptmann I was finally able to get on and try a couple of things. I had called llRezObject at the vector llGetLocalPos() + <0,0,1>. I used GetLocalPos because it was in a child prim. When it was a child prim, this did not work. When I changed it to llGetPos(), it worked even when the script was in a child prim, and it rezzed the object in question *over the child prim, not the root prim of the linked set*. Does this behavior seem strange to anybody else, or is my mind just not wrapping itself around this function? Baron llGetLocalPos is the child prim's position relative to the root prim. llGetPos is the prims' position relative to the <0,0,0> corner of the sim. So, it's not being rezzed becasue the local position is probably along the lines of a very few meters (or fractions of), so even with your offset the rezzing point you're asking for will be farther away than ten meters from the rezzing object. Thus, no rez. If you want to rez relative to the root prim, use llGetRootPosition().
|