Typing Override Script and Laptop Keyboard Too (Part 2)
In this series of howto category blog entries we're creating a scripted laptop keyboard.
Part 1 | Part 2 | Part 3 | Part 4
Further Introduction
Dolmere Talamasca: Oh, sure, you can sell it! Please make the script you use full perm though - you can make the object limited perm but the script itself can still be full mod.
W.D.: Aye, of course : )
Dolmere Talamasca: Mmake the objects, link it all together and into the root prim place Max's kb script. It should change the alpha value to 0 - make it invis when not typing and make it 1 - fully visible when you're typing. Pretty straight forward, limited editing.
W.D.: So I'll just attach it on me? the object with the script in it? Hmm, I got it semiworking.
Dolmere Talamasca: What's it doing?
W.D.: The keyboard shows but it's attached to my hand.
Dolmere Talamasca: OK, so you want to detach it, then instead of just wear it - you want to right click it in inventory. Choose attach to -> belly or pelvis, whatever. Then edit its placement - move it so it's hovering in front of you. Then type some text into chat and test.
Dolmere Talamasca: BTW - here's Max Case's free full mod keyboard http://www.slexchange.com/modules.php?name=Marketplace&file=item&ItemID=35638
[...]
W.D.: Thank you very very much!
Dolmere Talamasca: You're quite welcome. Enjoy!
What Needs To Be Fixed?
Here in this tutorial while enhancing FireEyes's laptop, especially in the coming entries where we will dig into editing the object and adding the final script, I'll attempt to clear up the LSL mistakes I made in my previously posted keyboard override article.
One of the biggest problems in the previous script was that I had replaced the actual show/hide functionality for the keyboard prim with linked messages. That was because in production the script I had posted was only one part of a larger disconnected system. As you might expect, I've remedied that oversight in the script to be shared at the end of this series.
Another issue was that a multiprim keyboard would not entirely hide/show properly but it only took a minor tweak to remedy the situation. Related to this issue, which I had not really worked through earlier, W.D. contacted me and pointed out the quick and easy fix.
[9:30] W.D.: hey again, sorry for still bothering you, I'm almost done, only got one problem, I now have a keyboard made by several prims, when I group it and place the script in contents only one prim gets hidden, not all of them.
[...]
[9:30] W.D.: [I have] one script in one group of 15 prims, I changed llSetAlpha to llSetLinkAlpha and some other stuff so it applied transparency to everything, works like a charm [now.]
I can't figure out which LSL wiki is which anymore so here are some links to the llSetLinkAlpha wiki page in various locations:
http://lslwiki.net/lslwiki/wakka.php?wakka=llSetLinkAlpha
http://slhomepage.com/lsl/llSetLinkAlpha.htm
http://wiki.secondlife.com/wiki/LlSetLinkAlpha
One last tweak made to the script was to add a trigger to run initialization when the device is attached. This worked around yet another little problem and thanks go to Alex Lapointe for helping me find the issue.
The Laptop To Modify
The freebie object we're going to modify is a laptop created by FireEyes Fauna. He built it as an entry in the game show Building Shelter. You might want to go get yourself a copy of the large unscripted laptop to follow along with the resize and/or script activattion howto articles. It can be ordered up for free here: http://www.slexchange.com/modules.php?name=Marketplace&file=item&ItemID=78094
I've put together a modified and fixed version of the keyboard override script and tested it through for accuracy. In the next entry in this series we'll review the process I used in making the new laptop into an avatar's keyboard. After that I'll post the entire script which you can copy/paste into your own objects.