R6 Dance Script

0 views
Skip to first unread message

Theodor Urena

unread,
Aug 3, 2024, 12:53:56 PM8/3/24
to walkjonyre

I wrote a synchronized dance system recently that worked fairly well. You need to be sure that the script in each of the pose balls starts the correct animation and starts it at precisely the same time. To do that, you designate one of them as the lead ball and have it send a signal to all of the other balls that contains two pieces of information: (1) the name of the dance to animate and (2) the time when the message was sent. The script in the lead ball and each of the listening ones starts a fast timer as the message goes out (or is received), watching the clock time. When they each determine that the current clock time is exactly X seconds after the time that was reported in the message, they start the named animation. They will be synchronized to within the length of a fast timer cycle. Once the dances start, you can stop the timer again and wait until the next time you need to sync dances. Other than that bit, the rest of the machine is just like any other poseball animation system.

When you write your script, basically all you need to do (other than providing the triggering command) is run a timer event that triggers your sound clips one after another. Avatars do not generally hear a sound the first time it is played, so the typical trick is to use that timer event to trigger llPreloadSound for the next clip while it is using llPlaySound to handle the current one. If the UUIDs for each of your sound clips are in a list in your script, you can loop back to the first clip when your timer has finished playing the last one.

In that case, your best bet it to post in the InWorld Employment forum to hire a scripter to write you a custom script. You might find something in a script library somewhere that would come close, but you'll still need a scripter to adapt it to your specific needs, which are custom. You can either search in-world script libraries or do a Google search for LSL scripts that meet your general needs, or you can post in the Wanted forum to see who might have one.

You don't. You will need to write completely different LSL scripts for that purpose. If you are not a LSL scripter, please follow the advice given earlier in the ancient thread and look for a scripter in the InWorld Employment forum.

I'm not sure they exist... if they do, you'll probably find you need to run them in an external script or spawn a thread with a small sleep at the start. I think units need a moment to initialise before they can play animations for you.

and there you go your boys are dancing machines, hope this helps. and of course you can have multipule units dancing at the same time just replace "p1" with "p2" and so on, is both the unit names, and the trigger or activation before where it says "playmove"

The reason I posted those 2 links is because the first one is an animation viewer, and could give you a list of usable animations for your dance script. The 2nd actually has the dance action in it (i must say, people in chernarus have an odd way of dancing) and that means that you could depbo it and take a look at the necessary bits of code.

It is supposed to return Any (Value). But when you use nil = []... you're reassigning it. I.e. hint format ["%1", _undeclaredvar]; you'll get the output Any. Also, clearing a variable using _myvar = nil; no longer clears it (I believe), but sets it to whatever you defined. Also see isNil.

Now when I add this, all of the target changes for the whole scene dissapear. That is the movement still happens, but there is no change in the camera direction, and it starts zooming right from the get-go, what is with that?

Not sure, but all my camera scripts are using camPrepareTarget, camPreparePos, camPrepareFOV, and camCommitPrepared. Not sure what the difference is, but the non-Prepare ones seem to be from OFP so maybe they work slightly differently?

P.S. You're running this in a context where sleep is permitted, yes? e.g. from execVM? Just a thought - can't see any other reason why it'd start zooming right away unless it was skipping through them.

Well man you are a lucky guy, i got up early today and looked at your cam thingy, and i see what you mean about it just staying on the last scene which is messed up and i don't really know why. But here is the good news i put all your cam stuff into a format that i learned out to use thanks to some nice tutorials out there and it seems to work just nice, and by the way if you are using that cam script on utes, some very nice shots you got there, so here is the stuff for ya

by having that on your map and in your cam sqs file, the cam will end and it will kick you back to your player. otherwise i belive the cam would just be stuck on the last scene forever. Hope this helps you out man. and again some very nice shots in your sequence.

Similarly, there's beauty in the small moments of Blake's script, like this early one that always stuck with me, in which John Dunbar - Costner's character - meets with a commanding officer to ask for a transfer to the frontier. A Union soldier in the Civil War, Dunbar has seen the war's brutal effects on his fellow soldiers' bodies, as well as his own. In his meeting with Major Farmbrough on page nine, he comes face to face with the horrors war can wreak on the mind.

By page two, we've seen the horrors of war in a time when field medics amputate legs as a matter of regularity. By page four, we've seen a demoralized Union line, shell-shocked into stillness by unrelenting Confederate fire. By page seven, Dunbar has attempted suicide and failed - but succeeded only in turning the tide of the battle in the Union's favor. "In trying to produce my own death," Dunbar says in voice-over, "I was elevated to the status of a living hero."

Nowhere is this more evident than in the picture of Major Farmbrough, an Army lifer whose service has clearly driven him off the deep end. He's filthy. Suspicious. Weirdly anachronistic. And at the end of his conversation with Dunbar, he proudly pisses his pants, then kills himself.

If we've had any reason to be uncertain that Dunbar is making the right move in asking to be transferred as far away from as many people as possible, they're gone by the end of the scene. We're with Dunbar now, because the script has given us a million good reasons to be.

[At Royal Woods Elementary, Clyde and some classmates are prepping for the Valentine's Day dance. Clyde is sitting next to a girl named Emma. Clyde and Emma both grab the glue bottle, this sends a jolt of energy up Clyde's arm, and hearts come flying out.]
Clyde: "Oops, sorry Emma."
Emma: "No worries, Clyde."
[Emma uses the glue, and Clyde sighs over her. Cheryl enters.]
Cheryl: "Okay, dance committee, let's recap everyone's duties for the big Valentine's shindig! Miss Chloe, how are those tunes comin'?"
Chloe: "Great! I convinced my sister to DJ for us." [Takes out her phone and shows a picture of a baby DJing at a dance filled with elderly people] "This is her playing Sunset Canyon's winter formal."
Cheryl: "Ooh, she had those seniors shakin' their rumps! Good job, Chlo-Chlo! Kay now, Emma honey, how are we doin' with the decorations?"
Emma: "Great! Riker has been helping me with the glitter." [Riker coughs some up.] "It's basically going to be a sparkle explosion!"
[She giggles as she throws some paper hearts into the air like autumn leaves. Clyde blissfully stares at her and daydreams about them holding hands, walking his cats through Tall Timbers Park. Suddenly, fantasy Emma calls Clyde's name and morphs into real-life Cheryl.]
Cheryl: "Clyde?! Clyde, sugar, have you decided what you're gonna fix for the dessert table?"
Clyde: [Snaps out of his daydream.] "Huh? Oh, oh right, dessert table." [Brings out a covered tray.] "I thought I'd keep it simple but elegant." [Uncovers the tray] "I've prepared samples. Anyone wanna try?"
[Everyone else raises their arms, with Emma's arm waving.]
Chloe and Cheryl: "Yes, please!"
Emma: "I do, I do!"
Clyde: [Gives Emma some chocolate cake.] "Here you go, Emma."
[Emma takes the plate, sending another jolt up Clyde's arm. He sighs again. Suddenly the bell rings.]
Cheryl: [Taking numerous desserts] "Okay, my little cherubs, I'll see y'all Friday to set up for the big night. Don't forget your dancin' shoes! Oo-ooh! Oo-ooh!"
[Exits]

[Later, Emma, Chloe, and Girl Jordan are at the library. Clyde, Lincoln, and Zach are at an adjacent table, Lincoln reading a magazine.]
Zach: "Aren't we a little young to be reading sixteen and a half magazine?"
Lincoln: "I borrowed it from Lori. According to this article, the best way to find out if someone likes you is by asking to borrow a pen. If the person gives you a fancy pen like a light-up or pom-pom one, they like you. If they lent you a normal pen, you're just friends. And if they give you a pencil, they don't like you at all."
Clyde & Zach: "Ooh."
[Clyde chucks his pen away, accidentally hitting Zach.]
Zach: "Ow!"
Clyde: "Let's do this!" [Clyde goes over to Emma.] "Hi Emma, I seem to have lost my pen. Do you have one I can borrow?"
Emma: "Sure. Let me just grab my case." [Opens it] "Here, you can borrow... this one."
[Reaches inside, among her many pens. Clyde shudders.]

[Liam and Rusty enter the cafeteria, dressed like baby cupids, and play a fanfare on bugles, getting everyone's attention. They stand on a table and continue playing, as Zach and Stella pull a cardboard gondola across the cafeteria, with Lincoln as the gondolier and Clyde with a rose in his mouth, they come to Emma's table. Crashing the gondola slightly, and Clyde takes out a heart-shaped cake.]
Clyde: "Emma, will you be my date to the Valentine's dance?"
Emma: [Initially touched, but kind of awkward.] "I'm really sorry Clyde, but I just wanna be friends."
[That word echoes in Clyde's eyes, and he passes out, heartbroken. Stella gasps, and she and Zach pull the gondola out, while Lincoln fans Clyde, and Liam & Rusty play "Taps" on their bugles.]

c80f0f1006
Reply all
Reply to author
Forward
0 new messages