Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Movement constraints.

Jesse Rollins
Registered User
Join date: 7 Sep 2005
Posts: 7
11-03-2005 08:55
I'm attempting to make a location for public art (and by this I mean an object(s) that is alterable by everyone) that resides in the center of a larger space. It would need to have two constraints. One would be on the total size of the object(s) and the other would be on the location of the object.

Think of it like this:
There's a public square, and in the middle is THIS OBJECT. The user could move the parts within it, change materials, sizes, etc... but two constraints:


1). Total size. While color, form, etc are all to be totally open... there is a limit. Somthing like 90m Z, 3m X & Y.

2). The origin of the objects. Whatever work is done must remain at the middle of the square. Users would not be able to move it around the site. In essence, the envelope defined above (3Mx3Mx90M) is fixed in position.


I guess this would be a local, limited sandbox.

Is there a way to do this... and how?
Much love to the scripters!
JR
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
11-03-2005 17:26
Maybe use the changed event with some if...thens to detect out-of-range scale/color params. Here's a link to the wiki info:
http://secondlife.com/badgeo/wakka.php?wakka=changed

And for the position... maybe you could try a combination of moving_start and moving_end events. For instance, when the prim starts moving, shift to a state that monitors the movement using a quick timer. Use if...then within the timer to detect position. If the position isn't within constraints.... grab the current prim params with llGetPrimitiveParams(), then use llRezObject() to create a fresh prim with an offset to keep it within your boundary. llDie() the collided prim. When the new prim is rezzed, have it llSetPrimitiveParams() with a list of params received from the dying prim. Receive them via private chat.

Or, make a wall of invisible prims around the build area. Include collision detection within your art prims - set to detect collisions with your wall prims. If they collide with a wall prim... follow the same steps as detailed above to place a new prim within the boundary.