These forums are CLOSED. Please visit the new forums HERE
How can I tell when someone enters AND EXITS my sim? |
|
|
Leyah Renegade
Live Musician
Join date: 2 Nov 2006
Posts: 125
|
11-19-2007 09:41
I know there are a number of ways to detect when an avatar enters an area, visits a certain area etc. But how can I tell when they leave? If I am an estate owner is there a way for me to write a script that will log when someone enters anywhere on the sim and when they leave? I'm trying to track the amount of time they spend there.
|
|
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
|
11-19-2007 09:51
Well, you can use llKey2Name or one of the avatar info functions until it stops returning valid info, but there is a caveat: if they go to an adjoining sim, they may still register as present, since they may stay a child agent to your sim for some time after leaving. llGetObjectDetails might be used by checking the position in that case, though.
Other than that, a full-coverage sensor network is about the only other way to do it. |
|
Rock Ryder
Registered User
Join date: 6 Oct 2006
Posts: 384
|
11-19-2007 10:02
I think what you want is in this thread, might cost you L$1 though!
![]() /54/64/89447/1.html It is always tricky to scan an entire sim using sensors, could you not limit people entering your sim to a central teleport hub? You could then just have a single repeating sensor at the hub. Rock |
|
Leyah Renegade
Live Musician
Join date: 2 Nov 2006
Posts: 125
|
11-19-2007 10:02
Well, you can use llKey2Name or one of the avatar info functions until it stops returning valid info, but there is a caveat: if they go to an adjoining sim, they may still register as present, since they may stay a child agent to your sim for some time after leaving. llGetObjectDetails might be used by checking the position in that case, though. Other than that, a full-coverage sensor network is about the only other way to do it. This would be for a private estate so there wouldn't be any adjoining sims. Wouldn't that be a lot of overhead though to keep checking every detected avatar to see if it goes away? Also, how do people deal with the 16 object limit that llSensorRepeat can return? What if there are more than 16 people present? |
|
Leyah Renegade
Live Musician
Join date: 2 Nov 2006
Posts: 125
|
11-19-2007 10:07
Ahh, thank you! I'll check it out and if it does what the author claims, I should be able to mod it for my purposes! It is always tricky to scan an entire sim using sensors, could you not limit people entering your sim to a central teleport hub? You could then just have a single repeating sensor at the hub. Yes I can do that easily, it's tracking when they leave that seems to be the tricky part. I can't report the total time they spent in the sim if I don't know when they leave. This script you referred me to supposedly does that, though, and hopefully does so without too much overhead. |
|
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
|
11-19-2007 10:12
There are no LSL functions which trigger events when people exit a sim, which leaves you having to use some kind of detection system, be it sensors or agent/avatar information functions. Either way you will have to build lists of people present, and then poll for their presence to see when they leave, then remove them from the poll list.
To get around the 16-object scan limit, you can use multiple sensors, and amalgamate the results, or you can use a narrow sensor beam and rotate it to scan an area. It's not pretty, but that's about all you can do. |
|
Leyah Renegade
Live Musician
Join date: 2 Nov 2006
Posts: 125
|
11-19-2007 10:29
Yeah that's what I was afraid of. Just wanted to make sure I wasn't missing something.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-19-2007 20:19
I built something similar for a non-spamming visitor greeter...
using a sensor, a list of avs and the time last detected. each av detected was checked for in the list, if there, the time was updated, if not they were added to the list with the time, at the begining of each cycle I ran garbage collection and compared last time to curent time, if it was over X, they were removed. with modification it makes for a much more accurate picture of traffic than LL's figures, and I've added several enhancements to speed and effieciency since then... I never bothered selling it because there seemed to be a lack of interest in the concept (I nicknamed it TrueTraffic).. but would happily dig it out if interest is there _____________________
|
| . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - |
|
Randal Kline
huh?
Join date: 1 Jul 2007
Posts: 192
|
03-16-2008 09:37
I built something similar for a non-spamming visitor greeter... using a sensor, a list of avs and the time last detected. each av detected was checked for in the list, if there, the time was updated, if not they were added to the list with the time, at the begining of each cycle I ran garbage collection and compared last time to curent time, if it was over X, they were removed. with modification it makes for a much more accurate picture of traffic than LL's figures, and I've added several enhancements to speed and effieciency since then... I never bothered selling it because there seemed to be a lack of interest in the concept (I nicknamed it TrueTraffic).. but would happily dig it out if interest is there I am interested in your TrueTraffic! Can I have a copy? ![]() _____________________
* Snapshots *
http://sluniverse.com/pics/Default.aspx?name=Randal%20Kline |
|
Patti Frye
Registered User
Join date: 25 Aug 2006
Posts: 60
|
03-16-2008 10:34
I really don't even understand why you would need something like this...This is a game! Who cares what avatar comes to your precious sim? SL is all about exploring. I welcome all to my little piece of SL. Stop by, chat and have a cup of java for awhile. Really...What harm can they do? Oh...maybe take a photograph of your treasures? Maybe sit down in one of your chairs with another "intruder" and talk awhile? There is too much paranoia about having visitors stop by your "private estate". It's not like they are going to do a home invasion and rape your wife, (or husband). As I see it...the only reasons to block anyone from there plot is:
A. Top Secret Builds! B. Your avatar like to be nude all the time C. You are having sex with children D. You are doing something you shouldn't be doing E. You are a hermit and hate all people, pets and avatars Lighten up dude! It's only a game...not like in the real world of Gangs, Drive-bys, Home invasions, Murders, Rape, and other normal everyday life! Piece! ![]() |
|
Kira Cuddihy
Registered User
Join date: 29 Nov 2006
Posts: 1,375
|
03-16-2008 11:29
Cut the poor guy a break Patti. I am sure he has his own reasons and that doesnt mean they are nasty. Most owners of real live websites track their traffic so they can figure out what ways to increase it or control it. That doesnt mean that is his reason though so why dont you just ask him instead of ripping him a new one.
By the way which "Piece!" of you, would you like me to have. _____________________
|
|
Chaz Longstaff
Registered User
Join date: 11 Oct 2006
Posts: 685
|
03-16-2008 13:44
How can I tell when someone enters AND EXITS my sim? I think there are little tin foil hats you can get that do this :} |
|
Patti Frye
Registered User
Join date: 25 Aug 2006
Posts: 60
|
03-16-2008 14:26
My apologies. I guess I've been the victim of too many GIANT RED BAN LINES.
No harm intended. |
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
03-16-2008 15:25
I can think of lots of really good reasons to want a script like this. If you need to file periodic reports with some agency in RL --- your university administration, your funding source, your boss, etc. --- they often want some evidence that people are actually using the sim you created with THEIR money and on THEIR company time. It could be important to know whether the users are casual fly-by visitors or whether they are staying for an hour or so to look around. You wouldn't need to know their names, but you'd sure need some way to be sure you knew whether the person who just left the sim has been there a while or is the same guy that just walked in 2 minutes ago.
I'd like to see this script myself. |
|
Chaz Longstaff
Registered User
Join date: 11 Oct 2006
Posts: 685
|
03-16-2008 15:43
I can think of lots of really good reasons to want a script like this. If you need to file periodic reports with some agency in RL --- your university administration, your funding source, your boss, etc. --- they often want some evidence that people are actually using the sim you created with THEIR money and on THEIR company time. It could be important to know whether the users are casual fly-by visitors or whether they are staying for an hour or so to look around. You wouldn't need to know their names, but you'd sure need some way to be sure you knew whether the person who just left the sim has been there a while or is the same guy that just walked in 2 minutes ago. I'd like to see this script myself. Ah yes. Actually very good reasons there. In which case then you'd also want to know total visitors, unique visitors, repeat visitors. Too bad you can't also query their profile to see what languages they can function in (if they have filled that out.) |
|
Kira Cuddihy
Registered User
Join date: 29 Nov 2006
Posts: 1,375
|
03-16-2008 16:18
My apologies. I guess I've been the victim of too many GIANT RED BAN LINES. No harm intended. /me tickles her under the chin and gives her a soft kiss on the cheek ![]() _____________________
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
03-16-2008 19:14
I am interested in your TrueTraffic! Can I have a copy? ![]() well the point was to sell it, the basic concept isn't hard (I basically described it above), even the optimization bit isn't so bad, but integration and various reporting features took a bit.... and I never finished all the proposed features, because I really couldn't see making something no one would use/buy when I had other project people were interested in. have no, buy yes =) @patti: actually the best reason for this type of thing isnt security, but rather tracking traffic from the perspective of your area.... LL's traffic figures are based on a percentage of logon time spent in an area by a given av.... this idea tracks only time spent in your area (vendor, store, etc) and gives a more accurate picture of how many avs and how much time are spent in your zone, regardless of time logged on... a much more useful figure for shop/attraction owners to gauge response to their builds/merchandise. it also helps you spot frequent visitors so you can target content towards them. never underestimate visitor loyalty, sometimes it's the silliest things that attract or retain visitors. _____________________
|
| . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - |
|
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
|
03-17-2008 01:46
This is what I am using in a skybox and a couple of smaller clubs.
I designed it primarily to test my SQL storage scripts, but the logic behind it is an example of what you are after. The list manipulation functions are the key. The resulting data could be sent off world via http or to some kind of in world storage as I am doing. To make an array of such sensors feeding a central system would be fairly trivial. CODE
The real benefits comes in mining the data The key queries I use for example are: SELECT Name, TimeNow WHERE here = 1 Returns a list of people present and how long since they arrived, great for greeting people. SELECT Name, DateFirst, DateLast, Visits WHERE TimeTotal > 60 Who has spent more than an hour and are they regular visitors? Great for sending out selective group invites. Want to know who attended a particular event? Select Name WHERE DateLast = 2008-03-16 AND TimeLast >30 Or To get info on a specific person Select * WHERE Name LIKE %Very Keynes% Well you get the idea. This will work against the SQL Storage script I posted a while back in this forum, but if anyone is interested in trying it, I can let you have my latest version. It is still in Beta though so I am not yet ready to post to the Library. |