These forums are CLOSED. Please visit the new forums HERE
Particle Typing Override |
|
|
Decafon Poliatevska
Registered User
Join date: 7 Aug 2008
Posts: 1
|
08-07-2008 21:47
I had an idea to create a typing animation override, but instead of using an animation, use a particle script. Is there any possible way to do this? I know the theory, yet not the practice.
|
|
Kaluura Boa
Polygon Project
Join date: 27 Mar 2007
Posts: 194
|
Typing Overrider
08-07-2008 22:37
This is totally possible. For any typing overrider, you need an attachment, what it actually does (show/hide something, emit particles, animate your AV) simply depends on the script in it. Everything that a script can do, that's what can be triggered by a typing overrider.
There are tons of freebie open source typing overriders... Well, one is enough. Find one and you'll get all that you need to start working. "floating keyboard" may be the right word to search for. If you really want to start from scratch, in practice, you need to check if your AV is typing or not in a fast timer event with llGetAgentInfo(). http://wiki.secondlife.com/wiki/LlGetAgentInfo And here is a skeleton of minimalist script: integer TYPING = FALSE; // global variable key OwnerKey; default { state_entry() { OwnerKey = llGetOwner(); llSetTimerEvent(0.5); // Check 2 times per second. // If that's not fast enough, you can speed it up // but below 0.3, the events start to get lost. } timer() { if (llGetAgentInfo(OwnerKey) & AGENT_TYPING) { if (! TYPING) { // Starting to type... Do something! TYPING = TRUE; } } else { if (TYPING) { // Just stopped typing... Stop doing your thing. TYPING = FALSE; } } } } Something very important: DO NOT (try to) STOP THE TYPING ANIMATION. If you do it, llGetAgentInfo() will report that you are NOT TYPING. (It was so, last time I checked.) Just my 0.02 L$ of the day... |