Jump to content

Attaching an object before the animation starts...


Emma Krokus
 Share

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

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

Recommended Posts

Scenario:

a wash tub - a washing line - hang up clothes animation - clothes item to hang up in wash tub inventory

Ideal scenario:

I'd like to have the avatar sit, for an item to temporarily attached to them, then start the animation when that item is attached and detach it when they are unseated

Issues:

I don't think from reading I can attach objects from a prim's content... how annoying!

so the item needs to be rezzed... then attached using llAttachToAvatarTemp

it's essential the avatar maintains its orientation towards the washing line... but I don't want the animation to start yet...

- so maybe I could use a kind of start/waiting animation maybe, then trigger the hang up clothes animation when the item is attached to the avatar with llGetAttached...? 

 

If anyone has other ideas or can point out flaws in my logic I'd be very grateful!

 

Emma :)

 

Link to comment
Share on other sites

You're pretty much on the right track.

You could put the animation in the attachment, and just handle the rezzimg part from the washtub. Have the attachment listen to the washtub, when the avatar stands up from the washtub, the attachment can detach.

Remember though, you'll need to request perms twice. Once to attach, then again to animate and detach.

So first ask for perms to attach on rez if llGetAttached is False, then again in the attachment event, if id is a valid key, ask for perms to animate and attach.

If the avatar stands and it never attached (they never accepted the perms), llDie, if it was attached, llDetachFromAvatar

Link to comment
Share on other sites

Your logic sounds fine to me. It's the same general sequence that you'd follow in many animation sequences:

Person walks into a bar, sits down.

When he sits, that triggers a sitting anim and rezzes a drink.

Drink delays a moment and then temp attaches.

When attached, the drink triggers a sipping anim, so the person starts sipping from the drink.

After a certain amount of time, or as the person stands up, the drink detaches, stopping the sipping animation as well.

Link to comment
Share on other sites

Thank you Rolig and Ruthven ! Your comments are really helpful :)

I will experiment.

And yes, I thought about putting the animation into the object BUT orientation towards the washing line is really important. 

I don't know how to do that as the avatar is free to wander with the attachment. I felt the animation needed to be in the wash tub which is linked to the clothes line to make sure the avatar does hang clothes on the line and not in midair somewhere.

And I am not nearly clever enough to know how to do it otherwise. But please... educate me!

Emma :)

Link to comment
Share on other sites

19 minutes ago, Emma Krokus said:

I felt the animation needed to be in the wash tub which is linked to the clothes line to make sure the avatar does hang clothes on the line and not in midair somewhere.

So, do that.  "Sit" on the washtub or clothesline to trigger the object to rez and, in turn, trigger the hanging anim.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2120 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...