I'd to know how to set this up and what LSL functions I need to use.
I have two box prims sitting in front me. I'd like to touch one and have the second one, say, turn red. The objects cannot be links.
How do I do this?
These forums are CLOSED. Please visit the new forums HERE
One object interacting with another object |
|
|
Isis Kukulcan
Registered User
Join date: 24 Feb 2006
Posts: 18
|
07-28-2008 08:39
I'd to know how to set this up and what LSL functions I need to use.
I have two box prims sitting in front me. I'd like to touch one and have the second one, say, turn red. The objects cannot be links. How do I do this? |
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
07-28-2008 09:06
You need to use a listen event in the reactionary prim such as
llListen (-9999, "", "control box", "" ;where -9999 is the channel that the box will be listening on, and control box is the name of the box you're going to be touching. That way, the listening box will only be listening for chat from the box you're touching, then in the control box, in a touch_start() event, do an llSay() on channel -9999 like so llSay (-9999, "red" ;Back to the receiver box.. you need to have a listen event to process chat heard from the controller box. CODE
and that should do it. http://www.secondscripter.com _____________________
My tutes
http://www.youtube.com/johanlaurasia |
|
Valradica Vale
Registered User
Join date: 8 Oct 2006
Posts: 11
|
idea
07-28-2008 09:10
put a script in the first one that uses the llSay() comand. make it say a command ("turn_red"
on a specific chat chnnel -- example: llSay(-33,"turn_red" ;in the second cube use the llListen command and the listen event to listen on channel -33 when the second cube hears the turn red command, use th llSetColor command to turn it red. depending on how far away the object is, you may want to use llWhisper, llShout or llRegionSay |
|
Isis Kukulcan
Registered User
Join date: 24 Feb 2006
Posts: 18
|
Thank you!
07-28-2008 10:32
Your help gave me additional ideas. Thank you again
![]() |
|
Cera Dreadlow
Registered User
Join date: 9 Jul 2008
Posts: 21
|
07-29-2008 13:14
I've been trying to figure out how all this works - very helpful!
![]() |
|
Cera Dreadlow
Registered User
Join date: 9 Jul 2008
Posts: 21
|
07-29-2008 13:54
Back to the receiver box.. you need to have a listen event to process chat heard from the controller box. CODE
This has been incredibly useful in helping me understand how these things work, but when I go to implement the script, I keep getting a syntax error with the "listen(" line. Any ideas why/suggestions of how to fix it? I was on a real roll (feeling like I actually understand a thing or two) and now I'm stuck. |