|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
01-15-2008 14:36
im working on my jetski still and i made it so that when im going above X ammount of speed it will switch animations i got that working good problem i have now is i cant seam to figure out how to move the llSitTarget, when i switch from relax to moving my avatar will be in the seat and half way in the water, how would i go about fixing this without making a custam animation? moveanimation() { llStopAnimation("jetski_relax"); llStartAnimation("motorcycle_sit"); llSitTarget(<-.09,0,0.7>,<0,0,0,1>); } sounds() { moving=llGetVel(); float total = llVecMag(moving); if ((total < 2 && start == TRUE)) { llLoopSound("Ducati Idle",volume - 0.5); llStopAnimation("motorcycle_sit"); llStartAnimation("jetski_relax"); llSitTarget(<-.54,0,0.03>,<0,0,0,1>); } else if (total < 3) { llLoopSound("D0",volume); moveanimation(); } else if (total < 6) { llLoopSound("D1",volume); moveanimation(); } // ect ect up to 17 }
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
01-15-2008 16:36
You can't change the llSitTarget() and have it affect an already-sitting avatar. You can, however, move the avatar around while seated, using llSetLinkPrimitiveParams(). I think in the simple one-seat case the seated avatar will always be the last (highest numbered) in the linkset, but being paranoid I usually hunt through the list for one with a llGetLinkKey() that matches llAvatarOnSitTarget() then move that one around as desired.
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
01-15-2008 16:52
doh >.> i figured that was the case.
oh well time to hit the animations again
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
01-15-2008 17:50
Umm... in case I wasn't clear: you can do what you want without making a new anim. It's just that you can't use llSitTarget() to do it, but rather you move the avatar around with llSetLinkPrimitiveParams(). (  Sometimes I think I do more damage than good. I *try* to be clear. Really.)
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
01-15-2008 18:00
that is why i stated doh >.> lol i got alot of script related stuff with the sit posttions and one little movment of a prim can screw with the ballance 
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-15-2008 19:04
I THINK you might want to update the sit target AND the avatar location at the same time, if you want the change to "persist" for when the next avatar sits. Not completely sure though. Might want to test it. Maybe not too important for this application though, unless avatars are likely to mount and dismount at high velocity. 
|