Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help please

Axelle Meng
Registered User
Join date: 7 Aug 2006
Posts: 4
06-28-2007 06:05
Hi everyone;

I would like to make a welcome carpet, so when someone walks over it i get a green chatmsg so i can say hello when i am online and inside the villa,
the object itself doesnt have to say anything, just send me the green chatmsg.
another little problem is that i am not the only one who lives in this villa, i am the owner of the villa but some of my friends live there also so if it would be possible they shud also recieve this chatmsg but only when they are online and inside the Villa.

Could anyone help me to create this script please ?

Thanks
Axelle :)
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
06-28-2007 06:44
If you're going to create the script, here's a few things you'll want to plan for:

1) You'll can create a notecard with the keys of the people you want to get the message. That way you can add and remove people, without changing the script itself.

2) You'll want to use llVolumeDetect to detect visitors, so when anyone walks into that prim (which would sit where you want your welcome mat, be sized to it, and be invisible and phantom) it will trigger a collision event, from which you can send your messages. This is a better approach in this case than a timer/sensor, since it takes no processing time unless someone is actually there.

3) You also have to take into account that the person arriving might walk on and off the mat - and you probably don't want a message each time they do. So the common approach is to keep a list of who has recently arrived, and not resend messages for them. But also to expire those names in some reasonable time (10 mins? 30 mins).

Rj
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-28-2007 14:00
One twist is that it's desired that the visitor announcement be sent to the other residents of the villa if they're online "and at the villa." So, it seems a periodic sensor scan is gonna be necessary anyway. If only the visitors who enter through the door are to be announced, the suggested collision approach is still better for detecting them, but if there's a need to know about visitors who gain entry by other means, then it wouldn't add much load on top of the sensor scan needed for detecting the residents. (That's assuming the villa and grounds aren't *too* popular; sensors top-out at 16 detections or something like that.)