How to continually type?
|
|
Rose Portocarrero
Here to look cute
Join date: 23 May 2004
Posts: 168
|
03-02-2006 07:10
Hello! I come to the scripting gurus for knowledge. Unlike the majority that wish to turn off typing for chat, I would like to be able to sit on a poseball and continually type as if I were chatting. Why you may ask? Well, I want to do writing, either notecard instructions, sales copy, etc while in world. I use the laptop attachements that shows I am typing when I am typing, and well, the default animation stops even if I haven't pushed enter. I had hoped to use this as a visual clue that I am indeed writing in world instead of just "sitting there" looking like I'm ignoring it. I tried the obvious of just puting the animation name "typing" into Crystalshard's script and well...it kinda stared at me. I have seen where folks have created scripts that stop the typing animation, is it possible to do the opposite and just continually type without spamming the world with..."yada yada..type type.." to just keep it going. *which is also counterproductive to writing in notecards etc.* I wonder if perhaps even scripters would find this useful as visual clues to others they are working? Thank you for reading and I hope this is just something simple that a seasoned coder would know. 
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
03-02-2006 07:17
Well, you could have a script that
(a) detected when you started typing, and started listening to you on channel 0 (b) detected when you stopped typing, and started up the typing anim again... (c) ...until it heard something from you, indicating that you'd pressed enter, and then stopped the typing anim
Unfortunately this would mean that if you started typing and then decided against it, you'd be sitting there forever waving your hands in the air. So you'd probably want to put some sort of timeout in there as well.
I have to say though that this will confuse people. As standard, when the typing anim stops, it means that that person is not actively typing any more. This may mean that people who were going to say something don't, and wait for you to finish your line. They're not going to be very happy if they find out that actually, when they thought you were typing out some huge essay, you'd gone to the fridge.
|
|
Rose Portocarrero
Here to look cute
Join date: 23 May 2004
Posts: 168
|
03-02-2006 07:33
hehe.. I guess you would be right in that statement that it may confuse some. I have seen people put floating texts over their head to indicate that "yes, I'm busy and not here at the moment." The intent was to be working in an office/home enviornment, not out in the store or on site of one of our builds where people would be present to ask questions. More like, they dropped in..saw me typing furiously with busy on my head and knew that perhaps I was actually that...busy.
As far as the wanting to pause, etc...that was the point of the "special chair" I would be in, or standing on...as the case maybe. I guess i was thinking in terms of like the gesture preview where you have play, loop, etc. Since I don't have the typing animation in my library, I can't just click on it and open that preview function like I can the animations that are in my inventory.
Anyway, if its something that is doable, I would still like to know..and no, I'm not a coder. I just saw that it was possible to stop the animation, just interested in keeping it going at specific times.
Thanks again.
|
|
Siobhan Taylor
Nemesis
Join date: 13 Aug 2003
Posts: 5,476
|
03-02-2006 07:37
It would probably be easier to just make your own typing animation (or have someone make one for you), include other features you like too... sitting position, head movements and so on... then put it into a poseball on the chair.
_____________________
http://siobhantaylor.wordpress.com/
|
|
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
|
03-02-2006 07:40
The UUIDs for default animations (and a lot more) are in the scripting wiki: http://secondlife.com/badgeo/wakka.php?wakka=ClientAssetKeysThe key for the typing one is c541c47f-e0c0-058b-ad1a-d6ae3a4584d9, just use that in your animation script. 
|
|
Siobhan Taylor
Nemesis
Join date: 13 Aug 2003
Posts: 5,476
|
03-02-2006 07:41
Ah, good call AJ... I still think a custom one would look better though.
_____________________
http://siobhantaylor.wordpress.com/
|
|
Rose Portocarrero
Here to look cute
Join date: 23 May 2004
Posts: 168
|
03-02-2006 07:46
Thank you all, and Siobhan, you are correct. That would be the best option and was also on my list if this didn't work first. Personally, I think it would be something that may be desirable for those that need to write in world. I'm even thinking those that blog in world, or would when we get html on a prim. I do agree it is confusing when it is what we see when we chat. I visited Max Case's blog today, and he had a doddle pad that someone had given him to try and used that for the typing default. Again, thank you for your feedback. My avie is already getting cramps in her hands thinking about having to type non stop.  EDITED TO ADD: ROFL!! Now the temp on rez laptop will just vanish until I do type in chat!! Well..at least I can fix that in 2 prims ROFL. TY you again AJ, I did get that to work though it tends to be a 50/50 thing as whether I'll stand and type or sit and type. *oh I'm such a scripting illiterate I know.* If any animators out there would like to make a "writer's animation" complete with ..yes..that's what I'm doing floating text over my head...I'll be happy to talk to the man that makes the lindens in the family to come up with payment. 
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
03-02-2006 08:17
Apparently from the Wiki the default animation is called "type", not "typing", so that might have been the problem. Anyway, here's a little something I knocked together while I'm waiting for something to finish processing: integer gTyping = 0; integer gLId = 0;
default { attach(key id) { if (id == llGetOwner()) { llRequestPermissions(id, PERMISSION_TRIGGER_ANIMATION); } else { llReleaseControls(); llSetTimerEvent(0.0); } }
run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llSetTimerEvent(1.0); } }
timer() { integer typing = llGetAgentInfo(llGetOwner()) & AGENT_TYPING; if (typing && !gTyping) { // Started typing so we start to listen llListenRemove(gLId); gLId = llListen(0, "", llGetOwner(), ""); gTyping = typing; } else if (!typing && gTyping) { // Stopped typing, if we're still listening // start the animation again if (gLId != 0) llStartAnimation("type"); gTyping = typing; } }
listen(integer channel, string name, key id, string message) { // We heard something - stop typing anim if we're not really // typing llListenRemove(gLId); gLId = 0; if (!gTyping) llStopAnimation("type"); // Reset typing flag so that if we're still typing really, // we'll start another listen gTyping = FALSE; } } Probably full of bugs.
|
|
Rose Portocarrero
Here to look cute
Join date: 23 May 2004
Posts: 168
|
03-02-2006 12:56
Thank you Ordinal. Thanks to AJ, and the template script from Crystalshard, I have hack and slashed my way to pretty much what i wanted. Far from perfect, but it does the trick. I have created a static laptop with floating text that says, "Rose is in writing mode and may not respond." Hopefully that should clue anyone who should stumble upon me in my virtual library. If animators are out there reading, their may be a market for this...especially if you can add in an animation for chugging down a big mug of coffee and then setting it down on the desk...but I'm sure that is better served in another forum. Thanks again for those that responded. My question was answered.
|