Jump to content

Best way to share animations with others via scripted object?


arisaie
 Share

You are about to reply to a thread that has been inactive for 362 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have 5 animations that I want the owner to be able to share with other avatars on the same sim.

My idea is to have a controller object that the owner attaches and if they chose to, they can press the HUD botton or provided gesture. This will make a sphere above their head visible and other avatars can touch it to get the animations. There is also 2 objects - 1 for each hand (which will have a script for color change and possibly particles). The HUD will have buttons to play individual animations and color change.

 

What would be the best way to share the animations?

 

I thought I would give the HUD (no mod, no transfer) to other avatars directly from the inventory upon touch. The HUD would have all functionality as the owners original but would detect teleport with CHANGED_REGION. CHANGED_REGION will trigger llStopAnimation +  llRemoveInventory (to remove the script and the animations) + will change the HUD texture to something like "You have left the person who shared animations with you. The HUD functionality has been disabled".

I would also possibly llSetTimerEvent to an hour to do the same thing. Is 3600 seconds possible?

I would also like the shared HUD to be no copy but...

llGiveInventory wiki says "If inventory is no-copy it is transfered to destination without copying it. Since it is no-copy the only copy is given to destination; removing it from the source prim's inventory." How would I go about setting the shared HUD to be no copy?

 

Would this be a good way to go about it or is there a better way?

 

Thanks!

Link to comment
Share on other sites

If the idea is to not let the people who are sharing the animations keep them, I'd just have the HUD of the main person play all of the animations. the downside would be a manual permissions request for each played animation.

As far as I know, in any scenario where you give the animations to the other person, (inside a HUD for example) it's ~possible for them to "steal" them for personal use.

Edited by Quistess Alpha
Link to comment
Share on other sites

6 minutes ago, Love Zhaoying said:

..plus 1 script per user that needs to be concurrently animated. Right?

Conventionally, yeah. Not because that script is needed for the animation to continue playing, but rather because it can stop (or change) animations, having already gotten permission to play the animation in the first place. If the users are going to change animations, it'd be annoying for a script to have to ask permission again, so it's easier to just have a separate script with permission for each animated user.

It's basically the same as a danceball with per-dancer scripts that ask permission once and retain it as long as the dancer is dancing, so it can change or stop that dancer's animations. 

  • Thanks 1
Link to comment
Share on other sites

23 minutes ago, Love Zhaoying said:

..plus 1 script per user that needs to be concurrently animated. Right?

~I like individually requesting perms per avatar in a single script, but unfortunately, that does mean a separate confirmation dialog per animation.

Edited by Quistess Alpha
  • Thanks 1
Link to comment
Share on other sites

While I think of it though, linkset data makes coordinating which 'helper script' to use a fair bit easier: each sub script advertises (with linkset data keys) the key of the avatar it has permisison to animate and the unix-time of the last animation start/stop it did. when the main script wants to do an animation, it loops through all the advertisements, making note of the lowest unix-time until either it finds a sub-script with permissions, and directs that one to do the animation, or it runs out of advertisements and asks the sub-script with the lowest unix-time to do the animation (causing a new permission request dialog for the avatar, and forgetting whoever it had permission for before)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 362 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...