Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Multiple Take Control methods?

Mykael Goodman
Registered User
Join date: 24 May 2006
Posts: 5
06-09-2007 07:14
I'm trying to make a script that will take controls of pretty much almost every control there is that can be taken. What I'd prefer most to do though is be able to take controls for the LBUTTON and ML_LBUTTON, and NOT make them passthru while all the other movement keys are taken control of, but allowing passthru so walking and stuff works like normal.

I know this could be likely done in 2 scripts, one taking control of just the LBUTTONS, and the other the rest of the controls, and using link messaging to handle the rest, but, this is both slow, and causes issues with two scripts in the same object taking controls, pressed & held jitters off because of the variations.

So, does anyone have any idea if and how this could be possible to do? Much appreciated for any help.

Mykael
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-09-2007 08:37
From my limited experience, llTakeControls() is pretty brain-damaged--the wiki talks about how to confuse it into passing the avatar rotation control, sorta against its will, but it's not obvious how to apply that to your problem.

But I'm thinking maybe three scripts would work better than two, where both of the control-taking scripts feed link messages to the third that actually does something with them, to better balance out the delays. It'll feel a bit like moving in molasses, but then using LSL to effect avatar motion always feels a little laggy--not to mention the actual lag contribution of processing all those events, and in this scheme, the link_message()s effectively double the already heavy load of the control() events. (This is probably why the outcome of "fighting games" in SL is much more a function of "luck of the lag" than any advantage of skill or weaponry.)
Mykael Goodman
Registered User
Join date: 24 May 2006
Posts: 5
06-09-2007 09:07
From: Qie Niangao
From my limited experience, llTakeControls() is pretty brain-damaged--the wiki talks about how to confuse it into passing the avatar rotation control, sorta against its will, but it's not obvious how to apply that to your problem.

But I'm thinking maybe three scripts would work better than two, where both of the control-taking scripts feed link messages to the third that actually does something with them, to better balance out the delays. It'll feel a bit like moving in molasses, but then using LSL to effect avatar motion always feels a little laggy--not to mention the actual lag contribution of processing all those events, and in this scheme, the link_message()s effectively double the already heavy load of the control() events. (This is probably why the outcome of "fighting games" in SL is much more a function of "luck of the lag" than any advantage of skill or weaponry.)


Hmmm.. That... Would be even worse.

This actually is a weapon script I'm trying to make, so molasses, ain't gunna cut it. *chuckles*

But based on the BattleZone System I made, and the Developer's Kit I made open-source for it, I've probably gotten it about the best as I can, for the multi-control parts.. Re-reading the wikis I could prolly fix up the simpler attacks to simply just take full control of the mouse..


My biggest problem, why I cannot use multiple scripts.. 2 scripts in the same object taking controls, causes glitches in the others. You can no longer truely detect if a control is down or pressed, because it's constantly pressing and releasing at that point, inconsistantly.

Mykael