Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Some Scripting Questions of my own.

Becky Tardis
Registered User
Join date: 15 Nov 2005
Posts: 98
01-08-2006 21:56
Ok, I had to split my code in two different sections because of memory overload. Here are some stuff I would like to know.

1) Can I have multiple (as in different scripts) Listen/Touches?

2) Can I send a Dataserver query in one script and catch it in another?

3) Can I start a Sensor in one script and act on it in another?

4) Scripts, hopefully, dont listen to link messages sent from themself?

4) Each script can have it own timers right?

Thank you for your help.
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
01-08-2006 22:07
1, yes. A script can have multiple listens itself too.
2, yes. Not sure that's a good thing. :)
3, no.
4, They don't hear themselves, but other scripts in the same prim do.
4, Yes, timers seem specific to the script.
_____________________
Xolu Tardis
Registered User
Join date: 7 Nov 2005
Posts: 1
01-08-2006 22:26
4) Scripts, hopefully, dont listen to link messages sent from themself?

they can
Intent Unknown
Registered User
Join date: 16 Nov 2005
Posts: 82
01-08-2006 23:56
CODE

default {
state_entry() {
llMessageLinked(LINK_THIS, 0, "test", NULL_KEY);
}

link_message(integer sender, integer number, string message, key uuid) {
llOwnerSay(message);
}
}


Yes, this works properly. So a script will hear its own link messages unless you specify for it not to send them to its own prim (in which case no other scripts in the same prim would hear them either).
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
01-09-2006 06:59
Wierd.

Says that scripts hear thier own link messages in the Wiki, too, but I've never had it work that way for me.

Live and learn :)
_____________________