Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

What number does touch_start event retun?

Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
08-12-2005 06:08
Hi there, I've not understood this yet.

What number does it return in touch_start(integer total_number) event?
Whenever I touched object, it returned "1". If someone else touched, does the number change such as "2"? Supposed three ppl there, A, B, and C. If they touched it in turn, would it return "1", "2", and "3"? And whenever B touched it, it would retun "2"? Is that number tied with each avatar's id or something? Sorry for asking such a basic thing. :D
_____________________
:) Seagel Neville :)
Jsecure Hanks
Capitalist
Join date: 9 Dec 2003
Posts: 1,451
08-12-2005 06:17
it returns the number of people who touched the thing, so you can do this

while(total_number > 0)
{

$key = llDetectedKey(total_number);

total_number--;
}


excuse the fact that my LSL is probably fused with PHP in places, that's what I do at work :)

P.S. Most of the time only one person touches something, so you use llDetectedKey(0);
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
08-12-2005 06:54
Thank you, Jsecure,

But you mean that just total_number in that event does not count ppl, right?
hmm... It must say 0 or 1, FALSE or TRUE.... shame. :(
Anyway, I got it. Thank you so much. :)

EDIT:
Or am I still making a mistake? If the object was touched at the exact same time, would the number count up? Sorry Jsecure, I don't want to know how to but what number returns and why it always returns "1".
_____________________
:) Seagel Neville :)
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
08-12-2005 08:47
It counts the number of people touching it in a short period of time, usually the time to switch events I think.

Most of the time that's one person, but if you put up a notecard dispenser at a meeting and say to everyone OK, go for it, you get enough clicks to make it appear to fail unless you cycle through all the touches.
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
08-12-2005 09:03
Eloise, thank you.

hmm... in a short period of time! It seems to be no use for my purpose. But your example is interesting. It can be a fast touch racing game. ;) Thank you.
_____________________
:) Seagel Neville :)