Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Conflict between AO and Flight Assist

Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
07-26-2008 12:14
I'm using two different scripts in one object. Both are open source scripts, you can see them here:

http://imakehuddles.com/code/cyberflight.html
http://imakehuddles.com/code/zhao-ii.html

So here is the conflict. I think it has to do with llTakeControls. When I use the ZHAO script on it's own, the avatar turns around when walking backwards. However, as soon as both scripts are active, the avatar no longer turns around when walking backwards. I'm thinking that it must have to do with both scripts using llTakeControls, but I'm unsure what to try, as I don't have a lot of experience with the control event.
_____________________
imakehuddles.com/wordpress/
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
07-26-2008 13:33
I know this one well :p It turns into a nasty battle when you mix these things in the same attachment.

You can try having both scripts take all the controls both want (CONTROL_BACK|CONTROL_FWD|CONTROL_UP|CONTROL_DOWN) so they won't clobber each other. I was kind of surprised that different scripts could overwrite each other's control masks, but yes that does happen.

(It looks like the ZHAO-II core you have on that web page is truncated, so I'm assuming you have the original control stuff there)

-----

For similar interference running ZHAO-II inside MystiTool (where the other scripts are no mod so it was a fresh surprise what would be compatible in each version), I gave up and ripped out the llTakeControls stuff and the control event, and moved the walk/female_walk killer up to the regular override loop.

In the original core, there is this bit:

CODE

if ( curAnimState == lastAnimState ) {
// This conditional not absolutely necessary (In fact it's better if it's not here)
// But it's good for increasing performance.
// One of the drawbacks of this performance hack is the underwater animations
// If you fly up, it will keep playing the "swim up" animation even after you've
// left the water.
return;
}


Right after that, insert the contents of the control handler that was removed:

CODE

if (curAnimState == "Walking") {
if (haveWalkingAnim == TRUE) {
llStopAnimation( "walk" );
llStopAnimation( "female_walk" );
}
}


... and that seems to work pretty well.

(actually, I see I messed up in the version I have out and inserted the stops before that check, will have to go do something about that now, serious overkill :o )

You only need to have one script in the prim taking controls for the AO to keep running, so if Cyberflight is going to be a full time bed buddy, this mod will be safe.
_____________________
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
07-26-2008 15:49
Not only did that work, it squeezed out a little more memory to boot. Thanks for the help. *sending you a prezzie*
_____________________
imakehuddles.com/wordpress/
Ephraim Kappler
Reprobate
Join date: 9 Jul 2007
Posts: 1,946
I walk backwards too!
10-11-2008 02:23
From: Keiki Lemieux
When I use the ZHAO script on it's own, the avatar turns around when walking backwards. However, as soon as both scripts are active, the avatar no longer turns around when walking backwards.

Is this an issue with the HUDDLES EZ Animator, Keiki? I use it on all of my alts and I noticed the same problem.