SubZeroWins
-
Posts
162 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Posts posted by SubZeroWins
-
-
So this trick cant work if I add another item?
-
I added one more list item for each person as for their key id, so I ran the following code
list highscores = [8, "3c9de8a0-1f38-4882-8dea-fdaee69f0fb6", "SubZeroWins", 10, "4354-32342324-3324342-3224323", "someotheravatar"]; default { touch_start(integer total_number) { highscores = llListSort(highscores, 2, FALSE); integer a; for(a = 0; a < llGetListLength(highscores); ++a) { llOwnerSay((string)llList2String(highscores,a) + "\n"); } } }
This is what returned:
SubZeroWins
10
4354-32342324-3324342-3224323
someotheravatar
8
3c9de8a0-1f38-4882-8dea-fdaee69f0fb6It shouldnt, right?
-
Seems pretty simple and I like it. I will try it and get back shortly.
Thank you!
- 1
-
Hello all
I have 2 lists which are parallel. I need to order the first one and at the same time order the second one (based the first's order)
list Names=["John","Chris",George"] list Points["10","9","15"]
Given the lists above:
John has 10 points
Chris has 9 points
George has 15 points
I will first order the Points list descending, using llListSort to become
list Points=["15","10","9"]
The Names list should now be ordered like
list Names=["George","John","Chris"]
I read a post for this which it seems to be complicated for me, can this work for me or should I search for another solution?
-
1 hour ago, animats said:
There's a L$0 full-perm wheel on Marketplace for this: https://marketplace.secondlife.com/p/Steam-Fair-Wonder-Wheel-4-prims/6324032
Full perms, so you can look at the code. Here's the inner loop which runs that wheel:
while(numberMoves > 0) { angle += changeAngle; llSetLinkPrimitiveParamsFast(linkNumber, [PRIM_ROTATION, llEuler2Rot(<0.0,0.0,angle>)*llList2Rot(baseRot,0)/llGetRootRotation()/llGetRootRotation()]); llSleep(0.003); // Sleep controls spin duraction, was 0.03 changeAngle *= 0.98;//deceleration of wheel only numberMoves -= 1; } baseRot = llGetLinkPrimitiveParams(linkNumber,[PRIM_ROTATION]); vector finalRot = llRot2Euler(llList2Rot(baseRot,0)/llGetRootRotation());
It's real prim movement, not viewer side animation. It's really random, too; not rigged. That sleep is shorter than it needs to be, though. 0.03 second works fine if you change some of the other constants that control wheel timing. Any sleep shorter than 0.022 second is too short, because that's the minimum physics frame time and nothing in-world will happen faster than that. Shorter, and you're wasting script time and may get throttled.
Where was that hidden lol I was searching for days for one, its very good, thank you so much!
- 1
-
Thank you people, I will try your ways and get back here later.
-
Before using llTargetOmega, I was trying with llSetRot but I couldnt manage to make it spin smoothly, is there a certain trick?
-
Like you said, llTargetOmega is not what I must use, so I should use llSetRot instead so everyone can see it spinning?
-
Hello all,
Im trying to create a simple wheel of fortune, since so far I managed to make it spin
default { touch_start(integer total_number) { llSetTimerEvent(1.0); llTargetOmega(<0.0,0.0,1.0>,1.0,1.0); } timer() { llOwnerSay((string)llGetLocalRot()); } }
the script is inside the wheel which is part of a linkset as a child, however when trying to get its current rotation I always get "<0.00000, 0.00000, 1.00000, 0.00000>".
Anybody can tell me what is wrong?
-
Thank you both, will try.
I attached a small cube on my arm and I use something that supposed to be a syringe to make an injection so when the needle touches this cube's face to play an animation.
But this pi thing always confuses me.
PS Do you think I should better use collision?
-
Hello all,
I have a cube and I want to use a repeated sensor but only for objects in front of a certain cube's face and ignore everything else. Is this possible?
-
Yay its working! Thank you again, you' re a doll.
- 1
-
Thank you, I will try that
- 1
-
I was trying to set a sound just for this person when coming online, so I was playing around with the settings.
Btw, I think this is not possible, right?
-
8 hours ago, Whirly Fizzle said:
Did you maybe use "Rem DN" in Contact Sets to remove that avatars display name?
Thank you so much!!!!!!!!!!!
Now I remember, few days ago I was playing around with these settings there.
Thank you again!!!!
- 1
-
2 minutes ago, Phorumities said:
Someone once asked me (on another account) how I was able to hide my login name and only show a display name. I explained that I had never used a display name.
Point is that everyone else can see this displayed name...
-
7 minutes ago, Wulfie Reanimator said:
Search for "display name" in your settings.
Hello, I can see everyone else displayed names
-
Hi all,
Im using Firestorm and suddenly I stopped being able to see the displayed name of a specific person, while others can see it normally.
Any ideas why this is happening?
-
2 hours ago, ellestones said:
its a bit unclear what you mean by it doesn't work. Would be good if you could explain that a bit more
i notice that in the 2nd you use Mode, in the 1st you don't. Other than that both codes are functionally the same
The first piece, having or not the Mode, it doesnt work. I mean it doesnt print any array of the passing list
Play(list Which, integer MyLen, string Mode) { for(a = 0; a <= llGetListLength(Which); ++a) { llOwnerSay(llList2String(Which,a)); } Get2=[]; RandomNum=RandInt(0,MyLen); //THIS IS ANOTHER FUNCTION I USE TO CREATE A RANDOM NUMBER SO NEXT TO GET A RANDOM ARRAY FROM THE CHOOSEN LIST Get2=llParseString2List(llList2String(Which,RandomNum),["|"],[""]); //EACH ARRAY LOOKS LIKE Sound1|3.5 WHERE RIGHT TO PIPE IS THE DURATION Duration=(float)llList2String(Get2,1); ToPlay=llList2String(Get2,0); llPlaySound(ToPlay,1.0); }
-
In details, what Im trying to do is to play sounds using the function, so my function is
Play(list Which, integer MyLen, string Mode) { Get2=[]; RandomNum=RandInt(0,MyLen); //THIS IS ANOTHER FUNCTION I USE TO CREATE A RANDOM NUMBER SO NEXT TO GET A RANDOM ARRAY FROM THE CHOOSEN LIST Get2=llParseString2List(llList2String(Which,RandomNum),["|"],[""]); //EACH ARRAY LOOKS LIKE Sound1|3.5 WHERE RIGHT TO PIPE IS THE DURATION Duration=(float)llList2String(Get2,1); ToPlay=llList2String(Get2,0); llPlaySound(ToPlay,1.0); }
But still this doesnt work
So far I made it work this way
Play(string Which, string Mode) { llStopSound(); Get2=[]; //HAVE ALREADY GLOBALLY DEFINED 2 LISTS WITH NAMES "Laugh" AND "Shout" if(Which=="Laugh") { RandomNum=RandInt(0,LaughLen); Get2=llParseString2List(llList2String(Laugh,RandomNum),["|"],[""]); } else if(Which=="Shout") { RandomNum=RandInt(0,ShoutLen); Get2=llParseString2List(llList2String(Shout,RandomNum),["|"],[""]); } Duration=(float)llList2String(Get2,1); ToPlay=llList2String(Get2,0); llPlaySound(ToPlay,1.0); if(Mode=="1") { llSetTimerEvent(Duration); } }
but I dont like it
-
Also ran the following inside the script
for(a = 0; a <= llGetListLength(TheList); ++a) { llOwnerSay(llList2String(TheList,a)); }
and it returned 1 line returning the passing name of the list "ListA" and one more empty.
-
Thank you all, but this didnt work, as I ran a test and the length of the array inside the function returns 1, it should be 2. Like the "TheList" is new empty array.
-
Hello
I was wondering if I can manipulate different lists through a function.
For example:
list ListA=["1","2","3"]; list ListB=["4","5","6"]; list ListC=["7","8","9"]; MyFunction(string TheList) { llOwnerSay(llList2String(TheList, 2)); } default { touch_start(integer total_number) { //TO PRINT 3, 6 and 9 MyFunction(ListaA); MyFunction(ListaB); MyFunction(ListaC); } }
Of course this is the wrong way but you can get the idea of what I want to learn.
-
little animation to the legs and hands
Ordering lists
in LSL Scripting
Posted
Ok thank you both. I missed to get a better understanding of the word "stride". I now googled it and see how it makes a difference.