Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Just a swinging... swinging...

Dick Sabra
Registered User
Join date: 26 Nov 2008
Posts: 36
03-28-2009 09:31
I am creating a simple swing. It is a rectangular prism (the seat) with two thin cylinders (for the ropes). I got the object made. Now, how do i get the swing to... well, swing? I assume you use a statement that makes things rotate. So how would i do that?

Thanks for any and all help given! :-)
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
03-28-2009 10:44
1. this isn't a free script forum, so if you're wanting someone to give you the script, you need to try products wanted.
2. if you wish to write the script yourself and ask us for help, there's plenty of people here that would gladly help.
3.this topic has actually been covered more than a few times, if you simply search for "swing" in the forums, i can guarantee that you will find the info you need
_____________________
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
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-28-2009 10:55
the statements you'll want to look at are probably
llGetRot
llSetRot

I don't recommend other variant methods (but there are some)
_____________________
|
| . "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...
| -
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
03-28-2009 11:20
I sell a pretty popular model at my store in Formal Affair East, check my profile picks for a teleport.
_____________________
My tutes
http://www.youtube.com/johanlaurasia
Dick Sabra
Registered User
Join date: 26 Nov 2008
Posts: 36
03-28-2009 11:55
From: Johan Laurasia
I sell a pretty popular model at my store in Formal Affair East, check my profile picks for a teleport.


I am not making this to enjoy (well, I will enjoy it a little :) ), but I am making it to sharpen my scripting skills. So just buying it would do me little good.

@Void, Thank you, I will look at those statements.

@Ruthven, If i can't get Void's suggestions to work, I will search the forum for it. :-)

Thanks everyone for the help. :-D
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-28-2009 23:07
other helpful hints
llSetTimerEvent for repeating steps
llEuler2Rot and DEG_TO_RAD to turns simple degree to rotations

myRot.s *= -1; //-- reverses the direction of a rotation

added * current
is the proper format for adding new rots
_____________________
|
| . "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...
| -
Dick Sabra
Registered User
Join date: 26 Nov 2008
Posts: 36
03-29-2009 08:08
From: Void Singer
other helpful hints
llSetTimerEvent for repeating steps
llEuler2Rot and DEG_TO_RAD to turns simple degree to rotations

myRot.s *= -1; //-- reverses the direction of a rotation

added * current
is the proper format for adding new rots

After I figured it out (I didn't use SetTimerEvent), I imed the script to a buddy, who helped me make it a lot more efficient, concise, and cleaner. The improved script used all your hints. :-D

Anyway thanks for all your help. :D
Kaylan Draken
Registered User
Join date: 2 Dec 2006
Posts: 127
03-29-2009 09:26
You can also use the tail script from post:
/54/fa/273758/1.html

i used that script for a swing and it works great