Jump to content

How can I use a script to start and stop flying?


Life Camino
 Share

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

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

Recommended Posts

I can start and stop the fly animation, but that is not the same thing.  I'm working on a follower script that will cause the user to follow another avatar and change animations as they change animations - so, if the other avatar starts to fly, the user needs to start flying.  And, if the other avatar stops flying, I need the user to stop flying.  So, how do I do this with a script?

Link to comment
Share on other sites

I'm actually using llGetAgentInfo and llGetObjectDetails to determine what the other avatar is doing and deciding on a built-in animation to start and stop based on that, rather than using RLV.  I don't want the other avatar to have to wear anything, either. 

The problem I'm running into is when the other avatar, who had been walking, decides to start flying, the following avatar goes up with them, but starts a falling animation, even though I'm telling it to start the fly animation.  If I click "Fly" on my viewer, the fly animation starts playing properly.  But, otherwise, I look ridiculous just flailing along behind the other flying avatar.  So, I need to figure out how to emulate the function of the "Fly" button on my viewers movement controls.  Any way to do that with a script?

Link to comment
Share on other sites

You can't force your avatar to fly with a script unless you're using RLV, so I assume that your av is actually sitting on a transparent object (your follower) and that you are triggering a flying anim if llGetAgentInfo detects that your target av is flying.  Try using llGetAgentInfo to detect your own av's state.  My guess is that you'll find it telling you that you are AGENT_IN_AIR .  Since you aren't really flying, that should trigger the falling anim.  If so, then you need to use llSetAnimationOverride to replace the "falling down" default anim with your flying anim.

Link to comment
Share on other sites

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