
Suggestions?
Mik
These forums are CLOSED. Please visit the new forums HERE
How to avoid polling llGetAgentInfo()? |
|
Mikael Aura
Registered User
Join date: 1 Dec 2009
Posts: 4
|
01-15-2010 08:07
I find myself wanting to use an attachment to detect when the player starts/stops typing and flying. Only way I see to detect this is via llGetAgentInfo(). That would mean running a timer on repeat. There's no way to get an event when the player changes state like this? I don't want to lag things down with an unnecessary timer that triggers 4 times per second...
![]() Suggestions? Mik |
Lance Corrimal
I don't do stupid.
Join date: 9 Jun 2006
Posts: 877
|
01-15-2010 08:12
are you talking about yourself or others?
_____________________
Your maturity rating is directly reflected by the number of question marks you place at the end of a question. Those who enter any virtual world with the main purpose of making money at it...probably won't. |
Mikael Aura
Registered User
Join date: 1 Dec 2009
Posts: 4
|
01-15-2010 09:26
On myself, for making, animation overriders, rocket belts, angelwings, furry jaws that open while typing...
|
Dora Gustafson
Registered User
![]() Join date: 13 Mar 2007
Posts: 779
|
01-15-2010 09:43
The best way to do what you want is by using:
http://lslwiki.net/lslwiki/wakka.php?wakka=llTakeControls This way you can fire a 'control' event on the keyboard keys you desire. Inside the 'control' event handler you can check what your av is doing at that moment: sitting, flying, walking, etc. For the 'control' event handler, see: http://lslwiki.net/lslwiki/wakka.php?wakka=control As a bonus: scripts with control will run on parcels with no scripts allowed. This is how AOs are made _____________________
From Studio Dora
|
Mikael Aura
Registered User
Join date: 1 Dec 2009
Posts: 4
|
01-15-2010 09:46
Yeah, that works for most cases, but for typing specifically, it doesn't
![]() Mik |
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
01-15-2010 11:26
For typing, you have to use a timer.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
01-15-2010 11:31
For typing, you have to use a timer. I never thought about that before. So all the avatars that are using a special typing anim are adding to their script load by running a script with a timer that kicks in every second or so to see if they're typing? If so, that's as scary as scripted hair and shoes. Or did I miss something? _____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |
Pete Olihenge
Registered User
![]() Join date: 9 Nov 2009
Posts: 315
|
01-15-2010 11:42
Don't most AOs use a timer loop anyway so that they can catch transitions between animation states that don't rely on control input, such as a change from falling to standing up?
|
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
01-15-2010 11:57
I never thought about that before. So all the avatars that are using a special typing anim are adding to their script load by running a script with a timer that kicks in every second or so to see if they're typing? If so, that's as scary as scripted hair and shoes. _____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |
Mikael Aura
Registered User
Join date: 1 Dec 2009
Posts: 4
|
01-15-2010 12:38
Mmm, yeah. It's not a disasterous load, but yeah, I think they all run on timers. Every time you see a furry's mouth that opens to speak (type), or every time a virtual keyboard magically appear under people's hands... there's a timer somewhere. Just for the sake of it, I checked my opensourced AO. There's a timer hidden inside that too, along with collision detectors and keyboard control...
Thanks guys, for the assist. ![]() |
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
01-15-2010 12:44
It's not even a noticeable load, compared to all the moving events that fire when you walk.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
01-15-2010 12:49
That's comforting. Thanks.
For a minute there I was afraid that in addition to telling people to get rid of scripted hair, we were going to have to advise them to stand there and shut up. ![]() _____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....
![]() Look for my work in XStreetSL at |
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
01-15-2010 12:54
Really, if you want people to cut down on sim load, the first thing you could do is to get them to sit. That way they become non-physical and don't take up the physics engine's time.
(yes, if an avatar stands in one place eventually they become non-physical.. until someone bumps them, or they move... sitting on a non-physical prim does it right away no matter what) _____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |