Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

I want to link this scripted prim

Blot Brickworks
The end of days
Join date: 28 Oct 2006
Posts: 1,076
07-21-2008 11:28
I made a script that does what I want ie: move a prim to the right in stages for 5 meters.change texture,then return and change texture again.this repeats in 5 secs.no prob this is what I want however I would like to link it with a 5 other linked prims that remain static .what must I add because when I try they all move together when it is root or it does not move at all.cheers hope you can help me.
_____________________


Blots Plot @ THE OLD MERMAID INN
http://slurl.com/secondlife/Dunbeath
/206/85/26

http://phillplasma.com/2009/05/01/blots-plot-the-old-mermaid-inn/
Blot Brickworks
The end of days
Join date: 28 Oct 2006
Posts: 1,076
07-21-2008 16:06
whoops, maybe I got a wrong post.I really need a solution for this prob.Please give give me some help.cheers.
_____________________


Blots Plot @ THE OLD MERMAID INN
http://slurl.com/secondlife/Dunbeath
/206/85/26

http://phillplasma.com/2009/05/01/blots-plot-the-old-mermaid-inn/
revochen Mayne
...says
Join date: 14 Nov 2006
Posts: 198
07-21-2008 17:10
Hi Blot

you should have started scripting after the object was build
because functions may have to change now to keep your objects functionality active.
try to make the moving prim a child prim in your object and give it the wanted functions using llSetLinkPrimitiveParams. it provides most functions like changing color and position of specific prims in a linkset.

=)
Blot Brickworks
The end of days
Join date: 28 Oct 2006
Posts: 1,076
07-21-2008 19:51
mmmm! thanks I will have a go and repost if I screw up .Cheers
_____________________


Blots Plot @ THE OLD MERMAID INN
http://slurl.com/secondlife/Dunbeath
/206/85/26

http://phillplasma.com/2009/05/01/blots-plot-the-old-mermaid-inn/
Kaluura Boa
Polygon Project
Join date: 27 Mar 2007
Posts: 194
07-21-2008 20:06
No, no, no... A very minimal change is needed.

Just like Revochen said, make sure that your prim is a child and not the root.

Then simply change any llGetPos() into llGetLocalPos(). So instead of using region coordinates, you'll use local coordinates that apply to child prims.

BUT, depending on the size and position of all the prims in the object, the moving prim may not go as far as expected because of the link limit. And, for this, there is no ready-made solution but experimentation.
Blot Brickworks
The end of days
Join date: 28 Oct 2006
Posts: 1,076
07-21-2008 22:17
Thanks, well I will try that too .Not tonight however I am bushed.Tomorrow is another day .Cheers
_____________________


Blots Plot @ THE OLD MERMAID INN
http://slurl.com/secondlife/Dunbeath
/206/85/26

http://phillplasma.com/2009/05/01/blots-plot-the-old-mermaid-inn/
Blot Brickworks
The end of days
Join date: 28 Oct 2006
Posts: 1,076
07-22-2008 07:32
Well tried both ideas but I am not, as you can see from the effort below a scripter.But it does the job if I could only link it.


default
{

state_entry() {

llSetTimerEvent(5);
}
timer() {

llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);
llSetPos(llGetPos()+<.50,0,0>;);

// set the texture
llSetTexture("clear",ALL_SIDES);

llSetPos(llGetPos()+<-6,0,0>;);

// set the texture
llSetTexture("white",ALL_SIDES);




}

}

I do hope someone can help as I have ground to a halt.
_____________________


Blots Plot @ THE OLD MERMAID INN
http://slurl.com/secondlife/Dunbeath
/206/85/26

http://phillplasma.com/2009/05/01/blots-plot-the-old-mermaid-inn/
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
07-22-2008 10:40
Try changing llGetPos() to llGetLocalPos(), and make sure the prim(s) that are moving are the child prims, not the root prim.
Blot Brickworks
The end of days
Join date: 28 Oct 2006
Posts: 1,076
07-22-2008 15:29
thanks I will try that. and we will see. start again and fingers crossed, Cheers
_____________________


Blots Plot @ THE OLD MERMAID INN
http://slurl.com/secondlife/Dunbeath
/206/85/26

http://phillplasma.com/2009/05/01/blots-plot-the-old-mermaid-inn/
Blot Brickworks
The end of days
Join date: 28 Oct 2006
Posts: 1,076
07-23-2008 02:16
Thank you that did the trick,job done cheers
_____________________


Blots Plot @ THE OLD MERMAID INN
http://slurl.com/secondlife/Dunbeath
/206/85/26

http://phillplasma.com/2009/05/01/blots-plot-the-old-mermaid-inn/