|
Vasile Underwood
Registered User
Join date: 11 Aug 2007
Posts: 8
|
08-21-2007 11:35
New to scripting, but I basically need a way to figure out how to make an arch. Basically, I'll be making a object with the script in it, then add a prim and it will create an arch out of it and copy the single inserted prim, to whatever is defined as a number to create. Anyone familiar with looprez, basically like that but in a arch. I haven't seen it done yet (At least to my knowledge.) Also being able to define the size of the arch would be sweet.
Thanks, VasileU
|
|
Vasile Underwood
Registered User
Join date: 11 Aug 2007
Posts: 8
|
08-22-2007 19:23
So no one really knows how to do this? Not really asking for the entire code but a point in the right direction would help alot.
VasileU
|
|
Kidd Krasner
Registered User
Join date: 1 Jan 2007
Posts: 1,938
|
08-22-2007 20:55
How about a clearer explanation of what you want? What does it mean to create an arch out of a prim? Change the shape of the prim? Or make multiple copies of the prim and place the copies along an arch-shaped locus?
I can't parse "copy the single inserted prim, to whatever is defined as a number to create" How do you copy a prim to a number? Does "inserted prim" mean linked? or placed in inventory?
I don't mean to pick on you, but people new to programming often underestimate the importance of having a clear, complete, consistent problem statement before writing a single line of code.
|
|
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
|
08-23-2007 08:35
You want to look at llRezObject(). It specifies the center position of the rezzed object and can be used with local coordinates. So just drop an object in the inventory of the 'rezzer' and then loop and calculate where to place each copy.
|
|
Dwen Dooley
Registered User
Join date: 3 Sep 2006
Posts: 6
|
create an arch
08-23-2007 10:12
if you mean as in a ST:TNG holodeck, Info Island (the first one) has a working holodeck with an Arch that responds to voice commands.
Other places have them too, but that's the one that comes to mind.
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
08-23-2007 13:43
From: Vasile Underwood So no one really knows how to do this? Not really asking for the entire code but a point in the right direction would help alot.
VasileU I have a spline generated sculpture (See link is sig) that does this. what you need is a loop, and a calculation of the position of the arc pieces, and their rotation relative to their positions something like this: (wrote this on the fly, probably won't compile) integer i; vector mypos=llGetPos(); float x=1;//size of the arc along the x axis float z=2;//size of the arc along the y axis for (i=0; i < 20; i++) { vector rot_vec=<x*llSin(PI*i/20),0,z*llCos(PI*i/20)>; llRezObject("Object",mypos+rot_vec,ZERO_VECTOR,llRotBetween(<0,0,1>,rot_vec),0); }
_____________________
My SLExchange shopTypos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work.
|
|
Vasile Underwood
Registered User
Join date: 11 Aug 2007
Posts: 8
|
08-23-2007 17:08
Senuka got the most of it, I'll go check that link he has. Pretty much the script is inside an object, then when the object is rezzed, I can take a prim I built and "place" or "put" it in the object, the script runs, copies the individual prim into multiple ones (predefined in the script and the size of the arc.) If it makes it any easier its for prim hair, basically just a clean even arc of my head.
VasileU
|