|
Wasabi Juran
Registered User
Join date: 25 May 2009
Posts: 10
|
06-04-2009 13:23
I have two scripts, one is a button which tells the other to change its texture to black. I cant get it to work for some reason. default { touch(integer total_number) { llMessageLinked(LINK_SET, 0, "screen", ""); }
}
default { link_message(integer sender, integer number, string message, key id) { if (message == "screen") llSetTexture("black",ALL_SIDES); } }
the top code is supposed to send a the message to the second peice of code, and the second prim is supposed to change to black. -both prims are linked -the texture black is in the second prim. Is there something im not seeing here? how come its not working..
|
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
06-04-2009 13:27
you are sending the message "screen" but looking for the message "door"
_____________________
http://slurl.com/secondlife/Together
|
|
Wasabi Juran
Registered User
Join date: 25 May 2009
Posts: 10
|
06-04-2009 13:51
ok, fixed that. But its still not working 
|
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
06-04-2009 13:57
it should if everything is as you say.
_____________________
http://slurl.com/secondlife/Together
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
06-04-2009 13:58
Add this line to the very top of the link_message event:
llOwnerSay ("got message from link " + (string)sender + ": number=" + (string)number + ", message='" + message + "', id=" + (string)id);
When you do the touch, do you see the message in chat?
edit: also, it would be good to double check that both scripts are in the same linked object and that they're both set to running...
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Wasabi Juran
Registered User
Join date: 25 May 2009
Posts: 10
|
06-04-2009 14:11
From: Meade Paravane Add this line to the very top of the link_message event:
llOwnerSay ("got message from link " + (string)sender + ": number=" + (string)number + ", message='" + message + "', id=" + (string)id);
When you do the touch, do you see the message in chat?
edit: also, it would be good to double check that both scripts are in the same linked object and that they're both set to running... I got that message, and its now working. Turns out i didnt have the running checkbox clicked. Thanks for the help 
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
06-04-2009 14:34
/me hates that.. Glad it's working now!
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
06-05-2009 08:40
From: Wasabi Juran I got that message, and its now working. Turns out i didnt have the running checkbox clicked. Thanks for the help  The Running box sometimes gets unchecked if you compile a script in an object's inventory, close the script window before compilation finishes, and the compile fails.
|