|
Jason Ayakashi
Registered User
Join date: 15 Nov 2006
Posts: 11
|
08-21-2007 19:00
Hi, folks. I'd like to create an attachment that generates an event when the wearer logs into Second Life and when they log out. Is there a way to do this? I searched the wiki and found ways to trap for teleportation and region changes, but nothing about login/logout.  Thanks for any help. Jason
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
08-21-2007 21:23
You can poll an llRequestAgentData() on an object and get an online/offline switch. Unfortunately, this event doesn't work on your attachment idea as it wouldn't be able to poll itself when offline.
You could also run a polling that simply tracks a timestamp...the problem is that logoff wouldn't be recognized (again)...but login would be recognized by time-difference in the timestamp beyond your polling rate.
Finally, you could attempt to run it through the "attach" event...as attachments are attached on login...but running detach information (attach key = NULL_KEY) on logout is unreliable at best.
So...umm...I guess the answer is no.
_____________________
--AeonVox--Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
|
|
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
|
08-22-2007 04:10
You can also try llKey2Name which only returns the name of an agent if that agent is online and - I believe - in the same region...
|
|
Jason Ayakashi
Registered User
Join date: 15 Nov 2006
Posts: 11
|
08-24-2007 08:06
Thanks for the advice, folks. I decided to make a non-attached object that uses llRequestAgentData to poll at a regular interval for the presence of all the folks I'm tracking. Not ideal, but it should work for my purposes.
|
|
Zuleica Sartre
Registered User
Join date: 27 Sep 2005
Posts: 105
|
08-24-2007 10:27
I had thought that either the on_rez or attach events were triggered on logon...don't remember now.
|
|
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
|
08-24-2007 10:30
Should work to just use on_rez
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
08-24-2007 20:29
From: Tiarnalalon Sismondi Should work to just use on_rez on_rez works for logon, but not reliably enough for logoff. The logon isn't a problem, it's the logoff that is.
_____________________
--AeonVox--Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
|
|
Silje Russell
lsl geek
Join date: 2 Oct 2005
Posts: 63
|
08-26-2007 02:12
i gone look at my codes how i did that when i get home from work. i have that on one of my products.
_____________________
Yes i know i got typos.. I got writing and reading problems. but i am still a humen!!
|