|
GaL Soyer
Registered User
Join date: 24 Feb 2006
Posts: 47
|
04-03-2007 10:07
Hello All  How can i make a command between: 1. two seperated objects (i.e. HUD that control car color, when i press ant button on the HUD and the color of the car changes) 2. two linked objects (i.e. HUD from two buttons, when one of them pressed - the other change its color...) thank you very much 
|
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
04-03-2007 10:19
From: GaL Soyer Hello All  How can i make a command between: 1. two seperated objects (i.e. HUD that control car color, when i press ant button on the HUD and the color of the car changes) 2. two linked objects (i.e. HUD from two buttons, when one of them pressed - the other change its color...) thank you very much  1) Use llWhisper for the command you want. Check the wiki http://www.lslwiki.org/index.php/Communications2) The ZHAO AO hud that is widely available for free has an example of item #2.
|
|
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
|
04-03-2007 10:21
Yes llWhisper is fine for two seperate objects that are < 10m apart. If the objects are linked, use llMessageLinked.
Rj
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
04-03-2007 10:40
From: RJ Source If the objects are linked, use llMessageLinked. Rj If they 'objects' are linked, then they are one 'object' For Question 1 you definitely want an llWhisper to communicate between the two objects. For Question 2, you definitely want an llMessageLinked to communicate between two scripts within the same object.
_____________________
--AeonVox--Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
|
|
GaL Soyer
Registered User
Join date: 24 Feb 2006
Posts: 47
|
04-03-2007 14:46
thank you very much!
what is the ZHAO AO thingy??? where can i get it?
|
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
04-03-2007 14:51
From: GaL Soyer thank you very much!
what is the ZHAO AO thingy??? where can i get it? http://www.slexchange.com/modules.php?name=Marketplace&file=item&ItemID=155913
|
|
Prospero Frobozz
Astronerd
Join date: 10 Feb 2006
Posts: 164
|
04-03-2007 18:33
What about when the objects are far apart?
The obvious answer seems to be to use llEmail -- but the receiving object doesn't have an event automatically raised when it receives email! As such, if you might do that, the receiving object has to set a timer and poll for email regularly, which seems horrible from a server performance point of view....
Is there a way other than setting a timer and running the "receive email" command to raise e-mail events to detect when you've received e-mail?
Also, on the llWhisper/llSay/llShout commands; there are warnings that using too many of them causes server lag. Is this true even if they aren't on channel 0? Or is it not considered a big deal to listen willy nilly on other channels?
-Rob
_____________________
--- Prospero Frobozz (http://slprofiles.com/slprofiles.asp?id=6307) aka Rob Knop (http://www.pobox.com/~rknop)
|
|
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
|
04-03-2007 18:56
From: Prospero Frobozz What about when the objects are far apart? Depends on where they are and what you're having them communicate for. As you mentioned you can use email, updating a variable on a server and checking it at intervals is also an option, sending a temp object between the objects is another...
|
|
Sys Slade
Registered User
Join date: 15 Feb 2007
Posts: 626
|
04-03-2007 20:19
If you really don't like the timers with emails, XMLRPC does raise an event when an incoming message is received. You can use httprequest to contact a webserver from the sender and have the server do the XML call (at least until they implement outgoing XMLRPC calls).
|
|
Kyrah Abattoir
cruelty delight
Join date: 4 Jun 2004
Posts: 2,786
|
04-03-2007 21:30
I highly suggest NOT using llMessagelinked simply for touch buttons, it is a thing from the past really, and with the following more efficient way to work, i would say it is even a bad, inefficient coding habit.
You can reduce the number of scripts you use (and the communication code) using this method:
By using a touch even in the root prim, when someone click any of the child prims, it fire the touch even of the main prim and you can use llDetectedLink() to get the link number of the prim that got touched, lets say you name a child prim "next", once you got the linknumber, you can use llGetLinkName, if it return "next" then its your "next" button that got clicked, you can use as many buttons as you want and you only need a single script.
If you need to make special effects on the button, like coloring it when clicked, again we can do it from the root prim, using llSetLinkParams, llSetLinkColor, etc...
_____________________
 tired of XStreetSL? try those! apez http://tinyurl.com/yfm9d5b metalife http://tinyurl.com/yzm3yvw metaverse exchange http://tinyurl.com/yzh7j4a slapt http://tinyurl.com/yfqah9u
|
|
Daisy Rimbaud
Registered User
Join date: 12 Oct 2006
Posts: 764
|
04-04-2007 07:44
From: Kyrah Abattoir If you need to make special effects on the button, like coloring it when clicked, again we can do it from the root prim, using llSetLinkParams, llSetLinkColor, etc... The one thing you can't do this way is change the floatiing text on a child prim.
|