From: Pepe Heart
I am looking for a script that will accomplish the following:
1. Avatar right clicks on a prim (a dance platform) and is moved from the avi's present position to the top of the prim in a standing position and with a 'stand up' button.
2. The avi can then choose animation from a separate dance ball, chim or an animation from inventory, which overrides the standing animation but does not relase the avi from the prim.
3. The avi can then dance without "standing up" (falling off the prim) until the avi is ready to stop and get off the prim by pressing the "standup button".
If your concern is just to make sure you don't fall off the prim while you're dancing, I don't think you need anything very elaborate at all.
Animations are client-side; that is, while your av appears to you and me to be moving, the sim doesn't think it's moving at all. That's why, if you and I are dancing near each other, if we appear to collide, we pass through each other rather than bump into each other as we would if we were walking.
Try dropping Winter Ventura's Agent Visualizer --
/54/c3/253812/1.html into a prim and then playing a dance anim, and you will see what i mean.
If the prim's large enough, you can just climb onto it and start dancing. If your animation takes you off the prim, you will appear to be dancing in the air until the anim returns you to the starting point at the end of the loop, and you stop the anim in mid-loop, you should appear to snap back to the start.
When I was a dancer I had to choose my dance anims very carefully to make sure I didn't do half my dances in mid-air over the audience if the stage was small -- it was that, not falling off the stage, that was the problem.
At most, I think all you need is to set a sit target that will position you on top of the prim, so you don't have to worry about climbing onto it, and make the default click action "sit" (which you can do by script
http://wiki.secondlife.com/wiki/LlSetClickAction or from the first page of the edit window).
Then either play a simple low-priority stand anim that your dance over-rides or just unsit yourself once you are safely on top of the prim (though, since unsits sometimes behave violently -- for reasons I don't understand and wish someone would explain -- that might risk throwing you off).