Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Scripting Unison Movement

Angelina Sinclair
Registered User
Join date: 4 Nov 2006
Posts: 34
06-21-2007 08:52
I'm a but stomp with this one and how to script it. Basically here's a example of what I want to do:

Have 25 objects linked together.

Make 10 of those objects in UNISON.

While at the same time keep the other 15 objects stationary.

Return all objects to the starting point.




Now so far I got 3 of those 4 things down, only problem is. The 10 objects won't stay moving in unison. They stop in unison.. but after they start they begin to move out of order.

Any ideas of how I can do this?
Prospero Frobozz
Astronerd
Join date: 10 Feb 2006
Posts: 164
06-21-2007 11:19
If we had hierarchical linking, this would be easy; make the 10 objects the children of a single object, and then just move that object.

As it is, I don't know a solution... unless you're willing to unlink the objects, and have just the 10 that are moving linked together.

What are you using to do the moving?
_____________________
---
Prospero Frobozz (http://slprofiles.com/slprofiles.asp?id=6307)
aka Rob Knop (http://www.pobox.com/~rknop)
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
06-21-2007 11:32
There is a script by me in the library that helps scripts stay synchronized. Regular Timer or something like that, I called it, I did.

Also, what are you using for movement? Some movement is server side, and some is client side. If it is client side, I don't know how a server side script can synchronize.
Angelina Sinclair
Registered User
Join date: 4 Nov 2006
Posts: 34
06-21-2007 11:34
Just some script someone gave me. The script has to be in each linked prim but not in the root prim, cause then the whole thing moves.

I still had to mod the script so that it can continously move, and be stopped on command.

Only thing is, the parts just won't move all together. I might have to leave them unlinked or something..
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-21-2007 15:13
The way I'd approch this is to synchronize the movement on a timer in one "controller" script that llMessageLink()s to slave scripts that move the individual prims. Theoretically, you could keep the slave scripts in the root prim and have them move their individual prims with llSetLinkPrimitiveParams(), but that might be difficult because you can't *get* the child prim positions from within the root prim. So, instead, probably the slave scripts would go in the moving child prims themselves. In either case, they'd just move when they got the link_message() events sent by the controller script.