Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

alternative to llWhisper ?

Sadako Shikami
Registered User
Join date: 2 Oct 2006
Posts: 52
08-19-2007 14:33
i'm using collision boxes in a maze, to give out portions of a song as the person walks through it ... my problem is, using "whisper" everyone in 10 meters can hear it and if of course keeps repeating as people walk thru. i need to get it into IMs, or a smaller radius? here's the script so far ...

default
{
state_entry()
{
llVolumeDetect(TRUE);
}
collision_start(integer num_detected) {
llWhisper(0, "top secret stuffs lalalala";);
}
}

i tried llInstant Message but i don't know how to target it to the user. i copied n pasted from the SL wiki's example, and it didn't IM me.

please help?? BTW i am giving credits to everyone who's helped or contributed to this project, let me know if you want credit!
_____________________
Body by Sadako - shape store
Rose & Thorn Fetish Lounge - adults only
(See my Picks for locations)
Sadako Does SL: http://sadako.typepad.com
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
08-19-2007 14:42
Try something like this:

default
{
state_entry()
{
llVolumeDetect(TRUE);
}
collision_start(integer num_detected) {
llInstantMessage(llDetectedKey(0), "top secret stuffs lalalala";);
}
}
Jotheph Nemeth
Registered User
Join date: 9 Aug 2007
Posts: 142
08-19-2007 15:55
Watch out with instant messages. Using it delays the script by 2 seconds. This is LL's useless method of preventing abuse of the command from sending spam out of the world.

"llInstantMessage has a built-in delay of 2 seconds. "

You'd think LL could simply track how many messages are sent by an owned object rather than adding a pointless delay that can simply be worked around. It doesn't do anything to stop someone who wants to spam. It just makes scripting with it a little more painful.
Sadako Shikami
Registered User
Join date: 2 Oct 2006
Posts: 52
08-22-2007 08:41
thanks RJ, i tried that, and nothing happened. i waited, assuming for lag. made sure my communications window was open, all that. i wasn't set "busy."

any other ideas?
_____________________
Body by Sadako - shape store
Rose & Thorn Fetish Lounge - adults only
(See my Picks for locations)
Sadako Does SL: http://sadako.typepad.com
Ultralite Soleil
Registered User
Join date: 31 Aug 2006
Posts: 108
08-22-2007 08:45
From: Sadako Shikami
any other ideas?

llOwnerSay is free (no script delay) and only the owner can hear it. One idea is to give each player something to wear. It can detect when it's near one of the trigger points and it can use llOwnerSay to tell the player stuff.
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
08-22-2007 11:08
Try llInstantMessage again, and make sure you're getting it right. It works just fine (except for the 2 second delay).

BTW, I suspect that the reason for the delay is not to prevent spamming -- we can do that with llShout() but it has no delay -- and you can only llIM a single av at a time.

The reason for the delay is probably the same as for other functions that have delays: it's a relatively expensive operation in terms of system resources (e.g., sim CPU time, global servers), so they want to discourage it.

BTW, the IM will show up in the normal chat window.