Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

quick question touch/msg whoever touched it?

Thili Playfair
Registered User
Join date: 18 Aug 2004
Posts: 2,417
01-16-2007 22:41
Not to sure how to do this, anyone give me a hand -.-
making a thing who will msg whoever touch it a msg, im not to sure how that work eh..

llInstantMessage(llDetectedName()+"text";); ?

,didnt work bit bafled since Wiki is still "temporary down" using this then http://rpgstats.com/wiki/index.php?title=Main_Page ,but cant really find this at all.
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
01-16-2007 22:55
Couple problems there...

Here's what you want, dropped into the default "Hello avatar!" script.
CODE

default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
}

touch_start(integer total_number)
{
llInstantMessage(llDetectedKey(0), "text");
}
}


- llInstantMessage takes a key, not a name, so note the use of llDetectedKey

- Both llDetectedName and llDetectedKey need an integer in the parentheses, indicating which one of possibly several detected objects it's supposed to react to. In this case, (0), the first one.

- no plus sign in there, a comma.

So read those Wiki pages and watch those little details, it's all in there if you look :)
Thili Playfair
Registered User
Join date: 18 Aug 2004
Posts: 2,417
01-16-2007 23:05
llInstantMessage(llDetectedKey(0),saytext);

(mine was llInstantMessage(llDetectedKey(0),+saytext);

yeh i found it now, just used to have detectstuff bookmarked but that page doesnt work now ~.~ thanks \o it was the + that messed it up n.n duh.