Typing Overrider
|
Serina Darkholme
Registered User
Join date: 11 Jan 2005
Posts: 35
|
04-05-2005 00:11
i made a quick script to block the Typing anim, but it always manages to squeeze a little bit of typing anim in before it blocks it, am i doing this wrong? is there a better way? pls excuse my messy code  list listy; string bob; default { state_entry() { llSetTimerEvent(0.0000001); llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } timer() { listy = llGetAnimationList(llGetOwner()); bob = llDumpList2String(listy," "); if(llSubStringIndex(bob, "c541c47f-e0c0-058b-ad1a-d6ae3a4584d9")!= -1) { llStopAnimation("c541c47f-e0c0-058b-ad1a-d6ae3a4584d9"); } } }
|
CrystalShard Foo
1+1=10
Join date: 6 Feb 2004
Posts: 682
|
04-05-2005 01:00
Your code is fine. The problem is that the reaction of the animation kicking in is always faster then the script's detection and execution of the the stop-animation command.
The only alternative I can think of to trying and enhance the reaction speed would be to constantly, blindly stop the type animation every timer tick.
Only problem is that this sort of a script would be crude and rather laggy.
|
Damanios Thetan
looking in
Join date: 6 Mar 2004
Posts: 992
|
04-05-2005 05:03
The easiest way to stop the typing anim is to actually start an anim with a higher (lower? i always get those confused) priority. You can set the priority during the upload of the custom anim. If this is applicable to your situation, i don't know.
|
Harris Hare
Second Life Resident
Join date: 5 Nov 2004
Posts: 301
|
04-05-2005 12:55
As of 1.6, there is now a "AGENT_TYPING" value you can check for in the llGetAgentInfo() function. You could use that instead of looking at the Avatar's current animations. I don't know if it would be faster or not, but it would certainly be cleaner code.
|
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
04-05-2005 17:46
Of course, you can do this without using a script. Just type a slash before typing anything else. /Hello will have your av say "Hello", but the av doesn't type.
|
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
|
04-06-2005 02:51
From: Harris Hare As of 1.6, there is now a "AGENT_TYPING" value you can check for in the llGetAgentInfo() function. You could use that instead of looking at the Avatar's current animations. I don't know if it would be faster or not, but it would certainly be cleaner code. much much faster because looking for the typing animation requires searching a list which is slow and take more overhead.
|
Brian Mifflin
Scripting Addict
Join date: 15 Dec 2004
Posts: 182
|
04-06-2005 03:08
From: Rickard Roentgen much much faster because looking for the typing animation requires searching a list which is slow and take more overhead. But it does use the dataserver event.....I haven't done any testing, does anyone know which way is faster?
|
CrystalShard Foo
1+1=10
Join date: 6 Feb 2004
Posts: 682
|
04-06-2005 04:50
From: Brian Mifflin But it does use the dataserver event.....I haven't done any testing, does anyone know which way is faster? Na.. you're thinking of llRequestAgentData() which polls the dataserver for online status, key2name resolve, date of birth, and rates. The llGetAgentInfo() command is instant and returns a bitfield. Much faster.
|
Brian Mifflin
Scripting Addict
Join date: 15 Dec 2004
Posts: 182
|
04-06-2005 04:55
From: CrystalShard Foo Na.. Oo, nice.....I was under the impression that is was a dataserver thing, glad I was wrong.
|