I am looking for a script that would move a small linkset up & down about 2-4 m SLOWLY.
Does such a thing exist?
Thanks,
The Scriptdummy
These forums are CLOSED. Please visit the new forums HERE
Moving small linkset |
|
Aztek Aeon
Registered User
Join date: 4 Jan 2008
Posts: 644
|
09-24-2009 09:11
I am looking for a script that would move a small linkset up & down about 2-4 m SLOWLY.
Does such a thing exist? Thanks, The Scriptdummy |
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
09-24-2009 09:52
Take a look at http://www.lslwiki.net/lslwiki/wakka.php?wakka=llMoveToTarget to see the general logic. There's an example of a simple function at that URL that will do what you need. Just adjust the time (tau) to make the movement as slow as you like. Call the function from a touch_start event or a timer that has a toggle in it to reverse the direction of movement from "down" to "up" on successive calls.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |
Aztek Aeon
Registered User
Join date: 4 Jan 2008
Posts: 644
|
09-24-2009 09:59
Rolig, I will study it and learn how to accomplish that, thank you for pointing me in the right direction.... despite not understanding a word you just said about calling a function
![]() |
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
09-24-2009 10:29
Oh... OK... well, try this. I haven't tested it in world, but it ought to work. If nothing else, it will give you something to play with.
![]() CODE
ETA: OK, I fixed couple of silly scripting errors since I posted this earlier today. ![]() _____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
09-24-2009 14:36
no timer in this one, simply uses at_target and not_at_target to determine when it arrives, and when it needs to change direction, doesn't have a touch start to turn it on/off but that's easy to add
/54/89/339170/1.html#post2558062 _____________________
Dark Heart Emporium
http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020 want more layers for tattoos, specifically for the head? vote here http://jira.secondlife.com/browse/VWR-1449? llDetectedCollision* Functions similar to touch http://jira.secondlife.com/browse/SVC-3369 |
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
09-24-2009 16:31
Oh well, I can finally get in world to test my script, and it really doesn't work well. I'll leave it here, but I recommend that you use Ruthven's. It does work.
![]() _____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
09-24-2009 16:47
CODE
_____________________
Dark Heart Emporium
http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020 want more layers for tattoos, specifically for the head? vote here http://jira.secondlife.com/browse/VWR-1449? llDetectedCollision* Functions similar to touch http://jira.secondlife.com/browse/SVC-3369 |
Aztek Aeon
Registered User
Join date: 4 Jan 2008
Posts: 644
|
09-25-2009 18:27
Thanks to both of you for your help.
I must be doing something wrong still as I cannot get Ruthens script to work And yes, I DO put the dummy in Scriptdummy. I should add that my biggest problem isnt the scripts themselves, but how to read them to know what to do in order for them to function. |
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
09-25-2009 21:43
You just drop the script in a prim and it does its thing. In this case, Ruthven's script just sits there and waits for you to click it. THEN it does its thing.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |
Aztek Aeon
Registered User
Join date: 4 Jan 2008
Posts: 644
|
09-25-2009 21:46
then something is indeed wrong. I will play with it some more and see what it could be... but all it does is sink to the ground.
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
09-26-2009 07:32
Ah... it works fine for me, but like many scripts that manage physical objects, it has a problem when it tries to move the object below ground level. You might try starting the object just slightly above ground level or, perhaps rewording the script slightly like this ...
CODE
See if that helps. _____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
09-26-2009 07:40
Actually.... Here's a version I just tried that works very nicely, using some of Ruthven's logic and the suggestion I just made in the last post ....
CODE
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |
Aztek Aeon
Registered User
Join date: 4 Jan 2008
Posts: 644
|
09-26-2009 07:46
I just tried them both... and the object sinks like a rock. I have t ried it from every height possible.
What can I be doing wrong. I thought I had cut and paste down pretty well... holy monkeys... |
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
09-26-2009 08:03
hmm, you said it's a small linkset, but how big is it? i did only try this in a single prim <5.0,5.0,0.5> sphere, i'll try it on a bigger link set sometime and see how it goes.
_____________________
Dark Heart Emporium
http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020 want more layers for tattoos, specifically for the head? vote here http://jira.secondlife.com/browse/VWR-1449? llDetectedCollision* Functions similar to touch http://jira.secondlife.com/browse/SVC-3369 |
Aztek Aeon
Registered User
Join date: 4 Jan 2008
Posts: 644
|
09-26-2009 10:57
Rolig sent me a single prim with the script that worked ok, tho it moved really fast and eventually went off world.
So I made my linkset smaller and tried the script and it moved a few times and then sank. if its ok, I am going to contact one of you in world and send the object I have and a description of what I am trying to do. I'm glad to pay some one to get this resolved so I can move forward with the project. I think it would be excessively simpler & less frustrating. |
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
09-26-2009 11:40
As Ruthven suggests, it takes energy to lift a physical prim. If the linkset is too massive, it will be hard to lift without applying an extra force .... even impossible if the object is quite heavy. When the direction of movement reverses, conversely, a heavy object will plummet to the ground unless you apply an upward force that is slightly less than needed to counteract gravity. Not knowing the mass of your linkset, I can't tell whether you need to include a force factor in the script.
As for the speed of movement.... Ruthven's script includes a variable called "speed" that he sets to 2.0 m/sec. You can change that to some lower number to slow movement if you need to. His script is more sophisticated than mine, in that the moving object slows down as it approaches its target. My script sets a constant speed, controlled by the variable "rate," which I set initially to 1.0. You can change that number by simply typing a new one in channel 88. Try typing "/88 4" for example. That should slow movement by a factor of four. When I was testing the 0.5x0.5x0.5m object I sent you in world, I tried values up to 20 (which makes the object crawl slowly upward). Again, SL moves physical objects in a way that's analogous to the way they move in RL. If your object is really massive, it may not respond well to changing Ruthven's "speed" variable or my "rate" unless we make provisions for an additional bouyant force. On the other hand, if it's very light, it may move much faster than you expect, so you'll have to monkey with "speed" or "rate" to slow it down. _____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |
Anastasia Serenity
Registered User
Join date: 2 Jan 2009
Posts: 53
|
09-27-2009 06:06
As Ruthven suggests, it takes energy to lift a physical prim. If the linkset is too massive, it will be hard to lift without applying an extra force .... even impossible if the object is quite heavy. When the direction of movement reverses, conversely, a heavy object will plummet to the ground unless you apply an upward force that is slightly less than needed to counteract gravity. Not knowing the mass of your linkset, I can't tell whether you need to include a force factor in the script. As for the speed of movement.... Ruthven's script includes a variable called "speed" that he sets to 2.0 m/sec. You can change that to some lower number to slow movement if you need to. His script is more sophisticated than mine, in that the moving object slows down as it approaches its target. My script sets a constant speed, controlled by the variable "rate," which I set initially to 1.0. You can change that number by simply typing a new one in channel 88. Try typing "/88 4" for example. That should slow movement by a factor of four. When I was testing the 0.5x0.5x0.5m object I sent you in world, I tried values up to 20 (which makes the object crawl slowly upward). Again, SL moves physical objects in a way that's analogous to the way they move in RL. If your object is really massive, it may not respond well to changing Ruthven's "speed" variable or my "rate" unless we make provisions for an additional bouyant force. On the other hand, if it's very light, it may move much faster than you expect, so you'll have to monkey with "speed" or "rate" to slow it down. I just saw this effect on my object just when I change the size from 1m to 10 meters high up in sky. It droped down on the ground like a rock - interesting! I keep learning this ![]() |
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
09-29-2009 07:57
In case anyone is interested, it turns out that the OP's "small linkset" has very few prims but is extremely massive, so working with it as a physical object is not a good option. This simpler script does the trick, though...
CODE
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |