These forums are CLOSED. Please visit the new forums HERE
Continual Rotation |
|
Hasina Solo
Registered User
Join date: 26 Oct 2009
Posts: 25
|
12-06-2009 23:39
hi guys, i need your help.... How am i suppose to use IF, Else for continual rotation? which means, 20degree, it will move, 40 degree it will move. but in between need a break. i hope u all understand....
|
Void Singer
Int vSelf = Sing(void);
![]() Join date: 24 Sep 2005
Posts: 6,973
|
12-07-2009 00:18
if you want continual steps (or a cycle of steps) and the movements are the same amount between steps, you can do that in two ways.
you can use a counter, add 1 to the counter each time it's used, and check if the counter is equal to the specific number, do the action that comes at that step. when the counter gets to a certain number you can reset it to zero. since this is a rotation, and if that rotation amount is the same between each step, you can apply just the change amount each time, effectively adding to the rotation. steps for the first method would look like llSetRot( vRotStep1 ); steps for the second method would look like llSetRot( vRotStep * llGetRot() ); _____________________
|
| . "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... | - |
Hasina Solo
Registered User
Join date: 26 Oct 2009
Posts: 25
|
12-07-2009 00:52
it is easy to understand. but when comes to implementing the codes, i am stuck. as for what u say, must i use if else statement? or any.....
|
Void Singer
Int vSelf = Sing(void);
![]() Join date: 24 Sep 2005
Posts: 6,973
|
12-07-2009 03:37
CODE
or CODE
_____________________
|
| . "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... | - |
Hasina Solo
Registered User
Join date: 26 Oct 2009
Posts: 25
|
12-07-2009 04:49
hey thanks for the help. according to the codes that u give, how to write like, if the angle of rotation is equal to 20 degrees, the track moves 20 degrees up. if angle of rotation is equal to 40 degrees, the track moves 40 degrees. Before the track moves to 40 degrees, it should rest first. Then when clicked again, it moves to 40 degrees. And where do the codes that u gave me to implement? I hope you would understand what i meant. becoz i have to hand in my project within few days. So i hope you would provide ans for my questions. i really do appreciate it....
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
12-07-2009 06:40
Ummmmm.... How to say this delicately? ....... The people who share thoughts in this forum suggest ways to tackle scripting problems and they occasionally post a neat idea of their own when they have a new approach to doing something that others might be interested in. Speaking as someone who spent her long career on university campuses, though, it doesn't feel right for me to be doing someone else's homework assignment.
_____________________
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 |
Void Singer
Int vSelf = Sing(void);
![]() Join date: 24 Sep 2005
Posts: 6,973
|
12-07-2009 13:08
@ Rolig
hence why I've been so detail sparse ![]() @Hasina try this page http://wiki.secondlife.com/wiki/LlSetRot and if you need a little help figuring out how that works try this one http://wiki.secondlife.com/wiki/Rotation and if that just confuses you, try this one http://wiki.secondlife.com/wiki/User:Void_Singer/Rotations (Sorry they're all in english, although the first two may have a translation, the second is my own, and only good with english, so no translation there) _____________________
|
| . "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... | - |
Hasina Solo
Registered User
Join date: 26 Oct 2009
Posts: 25
|
12-08-2009 01:23
thanks for the help....
|