|
Tobia Forcella
Registered User
Join date: 4 Mar 2007
Posts: 30
|
03-10-2007 17:24
Hallo to all, i'm new on scripting sorry for this question: i know the funcion llSay to write on the chat. It display (if channel =0) the name of the script and the message in green. What i want to know if there is a system to write in chat a message by the user that is wearing the object; the classic message "name user: message" in WHITE. It is possible? Please say yes  Thank you and sorry for my bad english!
|
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
03-10-2007 17:27
No, messages from objects are always green.
Otherwise you could use an object to pretend to be someone else, which would be chaos.
|
|
Tobia Forcella
Registered User
Join date: 4 Mar 2007
Posts: 30
|
03-10-2007 19:49
ok thank you!! Only another question: i did a little script to test: default { state_entry() { llListen(43333434, "", llGetOwner(), ""); } listen( integer channel, string name, key id, string message ) { if ( channel == 43333434 ) { llOwnerSay("ok"); } } }
It' seems to work well, if i send a message "\43333434 bla bla" i receive the green message "ok". But the problem is that if i give this object to a my friend, it doesn't work to him; and if we are wearing the object, he can see my green messages, but not him... What is wrong?? Again sorry for my english and thank you!
|
|
FireEyes Fauna
Registered User
Join date: 26 Apr 2004
Posts: 138
|
03-10-2007 19:56
You are only entering the default state when the script is first saved. When you give the object to your friend, the "llListen(43333434, "", llGetOwner(), ""  ;" line isn't being run, so the script is still just listening to you. You will want to make the script reset on_rez so that it runs the state_entry.
|
|
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
|
03-10-2007 19:58
Right. Just add.. on_rez (integer param) { llResetScript(); }
..inside the default state somewhere.
|
|
Tobia Forcella
Registered User
Join date: 4 Mar 2007
Posts: 30
|
03-10-2007 20:22
oh yeah!!! thank youuu!
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
03-11-2007 04:05
...or, for any extra little finesse: changed(integer change) { if(change & CHANGED_OWNER) llResetScript(); } Which will trigger only when the owner changes.
|