Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Silly collision question?

Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
02-28-2008 09:30
It seems like I have made something like this before, and I don't remember this problem. I am trying to make a doormat that will notice when an avatar stands on it, greet him, and open the door in front of him.

I used a collision_start event to figure out when he stepped on the mat. Seems simple enough. But when he walks on to the mat, it fires something like 5 times. Move slightly, fires again in multiples. Is there any simple way to deal with this?

I have thought of a couple of ways, but they seem too much for what should be simple. I could keep track of each avatar to collide for a certain time, and then check each collision against that list. Or I could set a timer and not recognize any new collisions for 1 sec.

Thoughts/ideas?
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
02-28-2008 09:43
my stupid solution: I put welcome mat scripts to llSleep for a time slightly less than the amount of time the door waits before closing (assuming it closes automatically). Keeps them from babbling too much when a crowd walks in.
.
Kaylan Draken
Registered User
Join date: 2 Dec 2006
Posts: 127
02-28-2008 09:55
Hi,

what you can do is look at a list if detected key or name is on the list.
if not say your message and add the name/key to the list.
and if the name already on the list do nothing.

with a timer you can reset the list every certain amout of time.
Hamncheese Omlet
what's for breakfast?
Join date: 2 Apr 2006
Posts: 79
02-28-2008 11:39
http://lslwiki.net/lslwiki/wakka.php?wakka=llMinEventDelay

That might help. It will cut down on the frequency