Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

objects rezzing objects,...

Allan Beltran
Registered User
Join date: 2 Dec 2006
Posts: 52
12-03-2006 16:03
My first thread, and I've done no scripting with LSL as of yet, but I'm eager to get moving. I have plenty of experience in scripting, however, I just have a few forward thinking questions before I begin. The first of which is objects rezzing objects.

I want to able to put "parts" into the "core" object's contents and have it rez the objects in onto itself. For instance. Let's say I make a vehicle body, and I have several tire types I can choose from. i.e. fat tires, spoked tires, tank tracks, etc. How would I go about making sure that a "tire_object" is rezzed where the tires should be linked to. Would I use an anchor point? Or maybe the Root Prim of the tires? It could also be a roof_object, or whatever. The point is, I want to make sure I put the part where it "logically" goes on the vehicle body.

My second question has to deal with rotation, and is an extension of the first question. Let's say I am rezzing a helicopter, and I have different main_rotors I want to choose from. Well, once I get the rotor where it belongs (as in the question above), how would I rotate the blades around the rotor shaft? I'm sure that is a common question and a simple link to an example would probably suffice.

Now, my final question (for now). I want the different tires to make a difference on the performance of the vehicle, say traction and speed are affected. Can I get some tips on how I would relay that info to the core vehicle, or would treating the linked tires themselves as the vehicle be sufficient to move the vehicle around? I guess what I am trying to figure out here, is will the rest of the vehilce inherently "follow" the tires if they are rezzed with the "core" vehicle body?

There's a lot I don't know, yet. And I'm certain I'll get a few "make something simpler" responses, but that's okay. I've never been one to take one simple projects from the start up.

These questions are mainly targeted for responses on the capabilities of LSL, so I can modify the direction I want to go in my design. For instance I know O2O is an issue, but I think I can do what I want to accomplish without it.

Thanks in advance for any help.
Allan Beltran
Registered User
Join date: 2 Dec 2006
Posts: 52
12-05-2006 12:37
Hmmm, not getting much love here on this.

That's not very encouraging for my first request, IMHO

Maybe I'm asking the questions wrong? Or is it too much to ask in one thread? If so, then I'd just like some info on rezzing objects from the inventory of a "core" prim to a specific spot on the rezzing prim, and link it, keeping the rezzing prim as the root. Would this affect the root prim of the rezzed object?

These are just thoughts that I am exploring while I am trying to figure out vehicle movements.

Any help would be appreciated.
Midori Mikazuki
Registered User
Join date: 20 Sep 2006
Posts: 78
12-05-2006 12:59
You might have better luck posing in the Scripting Tips forum. A lot of what you are asking about is related to scripting, not to SL Games per se.

-MM
Allan Beltran
Registered User
Join date: 2 Dec 2006
Posts: 52
12-05-2006 13:43
From: Midori Mikazuki
You might have better luck posing in the Scripting Tips forum. A lot of what you are asking about is related to scripting, not to SL Games per se.

-MM
Ah, thank you. I don't know why I posted it here. I guess because what I am trying to do is game related. I'll just repost the thread there, thanks again
JohnnyDept Clancy
Registered User
Join date: 15 Jul 2006
Posts: 21
12-31-2006 11:47
About rezzing parts of the vehicle in the right spot --- why not make these parts 100% invisible by changing the alpha channel and make them visible when you need them by sending linked messages to these objects?

Rotating? Simply alernate texture --- VERY easy to do.

Good luck!
Allan Beltran
Registered User
Join date: 2 Dec 2006
Posts: 52
01-03-2007 22:17
From: JohnnyDept Clancy
About rezzing parts of the vehicle in the right spot --- why not make these parts 100% invisible by changing the alpha channel and make them visible when you need them by sending linked messages to these objects?

Rotating? Simply alernate texture --- VERY easy to do.

Good luck!

JohnnyDept, thanks for the response. The reason I was wanting to rez an object at a specific point was to accomidate a "modular" design. More specifically, robots.

I've shifted gears in my project due to certain limitations LSL I've discovered. But the original project was to create modular robot "parts" that players would be able to assemble into a "core" robot chassis. The goal was to simply have the players drop the parts they want on the robot into the chassis inventory and then rez the robot for a competition. Each part would rez in its appropriate location on the chassis, like gun, radar, missile launcher, etc...

I'm still planning to do this, however, my initial aspirations were a bit lofty, I think. So, I've shifted gears to a more feasible, yet still fairly lofty, project. LSL is just another language to me, and as I get more familiar with it, I'm sure I'll be able to do what I had originaly planned, only not exactly HOW I planned.
Lucius Nesterov
Registered User
Join date: 12 Oct 2006
Posts: 33
Setting rez position
01-04-2007 07:00
This seems like a nice project, and I'm sure lots of people have given it thought at some point (including myself).

With regards to the technicalities, llRezObject allows you to set a position, for which you can read the root position with llGetPos and then add your offsets. I'm not sure about rotating to get them to line up (maybe rez them with the rotation you get from llGetRootRotation), but if the root object isn't rotated when you assemble the parts then it shouldn't matter.

A tricky part might be knowing what offsets to apply if you're just dropping parts into the inventory. You might want to use a naming system that determines where they should go, maybe starting each name with 2 characters e.g. ll = left leg, ra = right arm, he = head etc. So for example la_vulcanCannon would be given a left arm offset.

Commands to look up are llGetInventoryNumber (to know how many items to loop through), llGetInventoryName (to get object name), llGetSubString (to extract characters).
Allan Beltran
Registered User
Join date: 2 Dec 2006
Posts: 52
01-09-2007 12:07
From: Lucius Nesterov
This seems like a nice project, and I'm sure lots of people have given it thought at some point (including myself).

With regards to the technicalities, llRezObject allows you to set a position, for which you can read the root position with llGetPos and then add your offsets. I'm not sure about rotating to get them to line up (maybe rez them with the rotation you get from llGetRootRotation), but if the root object isn't rotated when you assemble the parts then it shouldn't matter.

A tricky part might be knowing what offsets to apply if you're just dropping parts into the inventory. You might want to use a naming system that determines where they should go, maybe starting each name with 2 characters e.g. ll = left leg, ra = right arm, he = head etc. So for example la_vulcanCannon would be given a left arm offset.

Commands to look up are llGetInventoryNumber (to know how many items to loop through), llGetInventoryName (to get object name), llGetSubString (to extract characters).
Thanks Lucius. Yeah, that was pretty much the plan, with the naming conventions and such. I've thought of going back to that project, but I want to stay focused on my current endeavors. I keep the original project in mind as I build on the current one and learn new stuff. I'll be using the inventory functions quite a bit, as well as the llRezObject function, so it will will all work out in the end.
Thanks again