Jump to content

run animation when prim is worn, how to change position from ground/prim


Guerlin Idlemind
 Share

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

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

Recommended Posts

Hi,

I have written a simple script (total scripting beginner) that will run an animation when an attachment is worn. My problem is that it starts the animation in mid air.

How do I adjust the position of the avatar relative to the ground and also relative to the prim attached (it's a seat) within the LSL script?

If anyone can give some pointers or links so I can make this happen, I'd appreciate it.

Link to comment
Share on other sites

I'm not a scriptor, but I am an animator. As far as I know, there is not sit position when you wear a script. I could be wrong here, but I don't think so. What I think you have to do is adjust the animation. You'd have to adjust the Tframe in the run, which is the first frame and it's position frame. You'd lower this to put the animation into the right spot. It might take a few back and forth uploads to get this right.

Link to comment
Share on other sites

Ahh.. Ok.. well that's a shame if that's true, as I didn't create the animation and can't edit it. Thanks for the input

Medhue Simoni wrote:

I'm not a scriptor, but I am an animator. As far as I know, there is not sit position when you wear a script. I could be wrong here, but I don't think so. What I think you have to do is adjust the animation. You'd have to adjust the Tframe in the run, which is the first frame and it's position frame. You'd lower this to put the animation into the right spot. It might take a few back and forth uploads to get this right.

 

Link to comment
Share on other sites

No, I'm afraid it won't work to rez it and then sit on it, the idea is to make a wearable seat so you can sit anywhere. 


Darkie Minotaur wrote:

I don't know the animation and the context - but if it's a seat that you're dealing with, would it be possible to sit on the object rather that wearing it? In that case, it would be simple to adjust the position and rotation of the ava through 
. and run the animation on the 
 event.



Link to comment
Share on other sites

If it's an attachment, the avatar's (unanimated) position is determined by the surroundings; an attached script can't change that.

It is possible, however, to push another high-priority animation on top of the one that's playing, where that new animation adjusts only the Z offset of the avatar as animated. I think OpenCollar has some of these height-adjusting animations inside, although I'm not sure if they'll work for the animation you're wanting to use. (Off the top of my head, I'm not 100% sure they're even priority 4, although they probably are, and you may have problems with the avatar rotating in ways you don't want, depending on how the current anim is oriented... but they may give you an idea of what's possible, and a looped frame offset animation is not that difficult to construct if none of the existing ones seem to work right.)

[Add: IIRC, if the avatar is wearing an AO that pushes another priority 4 animation on top of everything else, all bets are off. It would be possible to keep pushing and removing alternate versions of the pure offset animation--copy A, copy B, copy A...--and I've done something like that, but it can't prevent an occasional jump. But the same obtains with just sitting in a chair, so such is our lot unless/until scripts get smarter access to and control over animations.]

Link to comment
Share on other sites

You're correct.  When using sit, an avatar's position relative to the animating object is determined by a "target" point which may be modified via a script. When using attach the relative positions of the avatar and the animating attachment are determined via an attachment point, which may be modified only manually via editing the attachment.

Link to comment
Share on other sites

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