Ellie Oddenfen Posted September 28, 2018 Share Posted September 28, 2018 so, without an AO on i noticed that the default animation set there seems to be a "banking" or turning effect when changing directions while flying, as you can see in this gif https://gyazo.com/7b276c9b482caf9123fbfeb3c5a5cf43 however, i don't think this is an actual animation as i can't find it in documentation anywhere. how do i preserve this behavior in an AO? it looks a lot more natural that way Link to comment Share on other sites More sharing options...
Fionalein Posted September 28, 2018 Share Posted September 28, 2018 (edited) 3 hours ago, Ellie Oddenfen said: how do i preserve this behavior in an AO? it looks a lot more natural that way I think you don't - I still do it with AO's on - must be a viewer setting. PS: Maybe your AO has an upright flight animation where the banking cannot be seen as good. Try some other AOs then. Edited September 28, 2018 by Fionalein Link to comment Share on other sites More sharing options...
Talligurl Posted September 28, 2018 Share Posted September 28, 2018 It is a pain but you could always turn the AO off when you fly, Link to comment Share on other sites More sharing options...
LittleMe Jewell Posted September 28, 2018 Share Posted September 28, 2018 My bet is that it is related to the AO and/or flying animation. I use the built-in Firestorm AO and mine does not do that banking during a turn. I tried a bunch of other AOs that I have in inventory and some had me banking during the fly turns and others did not. I don't know enough about animations to make any better guesses on why/how. Link to comment Share on other sites More sharing options...
ellestones Posted September 29, 2018 Share Posted September 29, 2018 most AOs use a combination of: http://wiki.secondlife.com/wiki/LlTakeControls and: http://wiki.secondlife.com/wiki/LlGetAgentInfo some example lsl pcode which shows the basics of animation banking in the control event control(key id, integer level, integer edge) { integer keydown = level & edge; integer keypress = level & ~edge; integer keyup = ~level & edge; integer agent_info = llGetAgentInfo(id); if (agent_info & AGENT_FLYING) { if (keydown) { if (edge & CONTROL_ROT_LEFT) ...play left bank animation... else if ((edge & CONTROL_ROT_RIGHT) ...play right bank animation... } else if (keyup) { if (edge & CONTROL_ROT_LEFT) ...stop left bank animation... else if (edge & CONTROL_ROT_RIGHT) ...stop right bank animation... } else if (keypress) { ... other flying move animations ... } } } Link to comment Share on other sites More sharing options...
Ellie Oddenfen Posted September 30, 2018 Author Share Posted September 30, 2018 On 9/28/2018 at 9:03 PM, ellestones said: most AOs use a combination of: http://wiki.secondlife.com/wiki/LlTakeControls and: http://wiki.secondlife.com/wiki/LlGetAgentInfo some example lsl pcode which shows the basics of animation banking in the control event control(key id, integer level, integer edge) { integer keydown = level & edge; integer keypress = level & ~edge; integer keyup = ~level & edge; integer agent_info = llGetAgentInfo(id); if (agent_info & AGENT_FLYING) { if (keydown) { if (edge & CONTROL_ROT_LEFT) ...play left bank animation... else if ((edge & CONTROL_ROT_RIGHT) ...play right bank animation... } else if (keyup) { if (edge & CONTROL_ROT_LEFT) ...stop left bank animation... else if (edge & CONTROL_ROT_RIGHT) ...stop right bank animation... } else if (keypress) { ... other flying move animations ... } } } thank you! that's what i was looking for 1 Link to comment Share on other sites More sharing options...
Tristann Firehawk Posted November 20, 2018 Share Posted November 20, 2018 I'm trying to add this code to the control event of my AO in order to stop the default banking effect and substituting for my own banking animations (the default one makes my mesh avi to turn around strangely)... no success on stop banking effect or substituting it with another banking animation..... This is my control event... control( key _id, integer _level, integer _edge ) { if ( _edge ) { if ( llGetAnimation(Owner) == "Walking" ) { if ( _level & _edge & ( CONTROL_BACK | CONTROL_FWD ) ) { if ( haveWalkingAnim ) { llStopAnimation( "walk" ); llStopAnimation( "female_walk" ); } } } checkAndOverride(); } } I even changed the "id, edge and level" for "_id, _edge, _level" as it is on the AO's code. Could someone help me....? Link to comment Share on other sites More sharing options...
Love Zhaoying Posted November 20, 2018 Share Posted November 20, 2018 Have you considered using llSetAnimationOveride()? That function replaces most old AO’s (for “normal” situation). Link to comment Share on other sites More sharing options...
Tristann Firehawk Posted November 21, 2018 Share Posted November 21, 2018 Yes, Love Zhaoying I used llSetAnimationOverride on the code of flying and turning exposed before by Ellestones.....nothing happens. idk if i'm missing something.... Link to comment Share on other sites More sharing options...
ellestones Posted November 22, 2018 Share Posted November 22, 2018 in pcode your script says on (keydown or keyup) { if (the current animation is the default Linden walking animation) then { if (keydown or keyup is either back or foward) then { if (there is a provided walking animation available) then { stop the default Linden walking animation } } play the available provided walking animation } } am a little unsure what you mean by not working. While the script could be tidied up a little bit, as wrote does what the pcode says might be best to post your script in the LSL Scripting forum. So that other scripters can offer their thoughts Link to comment Share on other sites More sharing options...
Recommended Posts
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