|
Tex Nasworthy
Udder Disgrace
Join date: 2 Sep 2006
Posts: 1,330
|
11-03-2008 09:34
Let me start by syaing my scripting skills/experience don't extended beyond just the very basics. I have an idea for a project and I'm assuimg scripts would be the way to achieve what I want, however I don't even know if it's possible. Here is what I would like to do. Part one: I'd like to create a number of small rectangular prims and align them all on the z-axis. I'd like to allow anyone in SL to move these prims around on the x-axis and y-axis, but not on the z-axis. Is this possible? Part two: Assuming I can achieve part one, would it be possible it set minimum and maximum values that would limit how far the prims could be moved in x and y? Any thoughts or comments would be greatly appreciated. Thanks in adance, Tex
_____________________
. Forums Users Love Lustfully
|
|
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
|
11-03-2008 09:42
|
|
Tex Nasworthy
Udder Disgrace
Join date: 2 Sep 2006
Posts: 1,330
|
11-03-2008 10:04
Thanks for the reply, but at the risk of being a total newb, what is that telling me? 
_____________________
. Forums Users Love Lustfully
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
11-03-2008 12:02
From: Tex Nasworthy Thanks for the reply, but at the risk of being a total newb, what is that telling me?  It allows you to move the prims in response to mouse movements of any resident who is touching the object. llDetectedGrab() tells you the amount and direction the mouse moved, and you'd have to use movement functions like llSetPos() to do the actual prim movement. (I can't remember how well this works for in-world objects, but last time I messed with it in a HUD I really had to scale the amount of movement to make it work well. Play with it.) There are other possibilities as well, such as reserving the prim for any resident who touches it, requesting to take their movement controls, and having left/right/fwd/back move the prim back and forth along the x- and y-axes. You'd want to have some kind of release (like another touch or a certain key press) and/or timeout to release the user's controls and free the prim for movement by someone else. From: Tex Nasworthy Part two: Assuming I can achieve part one, would it be possible it set minimum and maximum values that would limit how far the prims could be moved in x and y? Any thoughts or comments would be greatly appreciated. Yes. Certainly. I'd start the first bit and then ask again if this part does not become obvious.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-03-2008 22:41
http://wiki.secondlife.com/wiki/LlGetStatusmight also help (though it's no exactly what you are looking for), in that it can keep an object from rotating on a particular axis detected grab tells you what direction the object is being dragged in though I can't remember if it's relative to the prims axis, or the world, but locking the axis would force it to be relative to the world as long as the object is placed on the world axis. form there you'd do something like check if it's going in a direction you don't want, and correct it by moving it's position (though that may affect the grab so I don't know) you'd probably have to check distance moved seperately via moving_end (or start a check loop in the timer via moving_start and turn it off in end, but moving end is unreliabe for physical objects)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|