|
Ovaltine Constantine
Registered User
Join date: 28 Jul 2008
Posts: 179
|
04-26-2009 18:36
control(key id, integer held, integer change) { integer pressed = held & change; integer down = held & ~change; integer released = ~held & change; integer inactive = ~held & ~change;
if(CONTROL_UP & released) { llOwnerSay("Up key released"); }
}
I made that as an example, and it should say "Up key released" only when I release the up key. And it does, except after I change regions. After I change regions, that event gets triggered as if I were actually holding down the up control. I.e. it says "Up key released" over and over while I'm holding the up key. Does anyone know why this is, and what if anything I can do to fix it? It's completely destroying something I'm trying to make.
|
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
04-26-2009 18:57
Hmm, can't duplicate it here. I suppose it could be a freaky keyboard but somehow I doubt that. Does it happen if you use any of E, PgUp and little mouse navigation window thing?
Do any other scripts in the same prim also take controls? If yes, all scripts doing that should use identical llTakeControls flags, because they like to compete.
|
|
Ovaltine Constantine
Registered User
Join date: 28 Jul 2008
Posts: 179
|
04-26-2009 19:45
When you tried to duplicate it, did you do the changing regions part of it?
Yes, it happens with page up, E, and movement controls.
There are other scripts in the same object that take controls, but not in the same prim.
|
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
04-26-2009 19:54
From: Ovaltine Constantine When you tried to duplicate it, did you do the changing regions part of it? Yep. Both crossing and teleporting, can't make it happen. From: someone There are other scripts in the same object that take controls, but not in the same prim. You might try lining up the controls to be the same anyway, just to see what happens. LSL controls are really, really fragile.
|
|
Ovaltine Constantine
Registered User
Join date: 28 Jul 2008
Posts: 179
|
04-26-2009 20:25
Yay! I changed the llTakeControls() in the other prim to match the one in the main prim and now it works! Yay!
|
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
04-26-2009 20:37
Yay but yuck, that's a pretty big constraint :/ I was hoping that this would be a prim-local phenomenon, and that the auto permissions we now get in child prims would be the way to a workaround, but oh well.
|