Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Scriping: Can someone point me in the right direction?

Kerri Macchi
Registered User
Join date: 28 May 2008
Posts: 3
12-02-2008 08:36
Hello All,

I've been scratching my head on this issue and thought i'd share it will you all;

I have a rotating object - I want to have a slider/button which when touched can increase / decrease the speed of the rotating object

Can someone point me in the right direction?

Any advise is welcomed

Thank you - thank you - thank you!

Kerri :)
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
12-02-2008 09:09
You might want to try the llDetectedTouch*() functions. They are good for things like "sliders". You could probably set a texture offset to indicate the slider's "current position". llDetectedGrab() can sometimes be useful as well, but you'll have to play with it.
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
12-02-2008 10:31
Seems like a lot of work. It would be much easier to use chat commands.
Cappy Frantisek
Open Source is the Devil!
Join date: 27 Oct 2006
Posts: 400
12-02-2008 10:42
Points to the right. Is that the right direction? :)
Klug Kuhn
Registered User
Join date: 7 Sep 2007
Posts: 126
12-02-2008 16:09
You could try using llTargetOmega() with a smooth rotation. Paste the below script onto a simple box, touch and hold it to increase the speed. When the speed goes up to 10.0, it will then drops back to 0.0 and repeat.



float speed = 0.0;
default
{
state_entry()
{
}
touch(integer int)
{
speed += 0.1;
if (speed > 10.0)
speed = 0.0;
llTargetOmega(<0.0,0.0,1.0>,speed,1.0);
}
}
Kerri Macchi
Registered User
Join date: 28 May 2008
Posts: 3
12-04-2008 02:53
Thanks for the posts!
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
12-04-2008 06:55
btw, please do us all a favor and put your subject in the thread subject.

Nearly all the posts on this thread are "please help me with scripting", so try to be a little more helpful, like "controlling rotations with slider or button". A moment of your time saves time on the part of lots of others who may or may not be interested in or knowledgeable on your issue. And it makes it more likely for you to catch the attention of someone who can help you.

Thanks, and welcome to the SL forums!
Ima Huckleberry
Registered User
Join date: 28 Nov 2008
Posts: 29
12-04-2008 12:18
*Points to the left* Is that any better?
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
12-04-2008 13:44
From: Yingzi Xue
Seems like a lot of work. It would be much easier to use chat commands.

Yes it would be easier for YOU to write a chat control. That way you can put all the work onto users of your scripts instead of taking the time to give them a clean UI and make their SL experience more pleasant.
_____________________
http://slurl.com/secondlife/Together