Somebody help please!
|
|
Marlon Brocco
Registered User
Join date: 15 Jul 2005
Posts: 132
|
07-23-2006 22:20
Can somebody please tell what's wrong with this script? I keep getting a syntax error! I just want it to listen on a channel for when I want to change Slingo Hosts and change to the associated texture that's in the object. Thanks! I'll be in world for a little while if you want to IM me. default { state_entry() { llListen(777, "", NULL_KEY, ""  ; } listen(integer channel, string name, key id, string message) { if(message=="builderman"  { llSetTexture("builderman", ALL_SIDES); } if(message=="desiree"  { llSetTexture("desireemaltese", ALL_SIDES); } if(message=="marlon"  { llSetTexture("marlonbrocco", ALL_SIDES); } if(message=="off"  { llSetTexture("mon-sunsltime", ALL_SIDES); {
|
|
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
|
07-23-2006 22:35
This compiles OK for me: default { state_entry () { llListen (777, "", NULL_KEY, ""); } listen (integer channel, string name, key id, string message) { if (message=="builderman") { llSetTexture ("builderman", ALL_SIDES); } if (message=="desiree") { llSetTexture ("desireemaltese", ALL_SIDES); } if (message=="marlon") { llSetTexture ("marlonbrocco", ALL_SIDES); } if (message=="off") { llSetTexture ("mon-sunsltime", ALL_SIDES); } } }
|
|
Marlon Brocco
Registered User
Join date: 15 Jul 2005
Posts: 132
|
Somebody help please!
07-23-2006 22:43
This worked! Thanks so much..... you rock! From: Angela Salome This compiles OK for me: default { state_entry () { llListen (777, "", NULL_KEY, ""); } listen (integer channel, string name, key id, string message) { if (message=="builderman") { llSetTexture ("builderman", ALL_SIDES); } if (message=="desiree") { llSetTexture ("desireemaltese", ALL_SIDES); } if (message=="marlon") { llSetTexture ("marlonbrocco", ALL_SIDES); } if (message=="off") { llSetTexture ("mon-sunsltime", ALL_SIDES); } } }
|
|
Xixao Dannunzio
Owner, X3D Enterprises
Join date: 20 Mar 2006
Posts: 114
|
07-23-2006 22:49
This is SOOOOOO much more complicated than it needs to be. Make your life easier: default { state_entry () { llListen (777, "", llGetOwner(), ""); // Only you can change it } listen (integer channel, string name, key id, string message) { if (message == "off") { llSetTexture ("mon-sunsltime", ALL_SIDES); }else{ llSetTexture (message, ALL_SIDES); } } }
...just speak the texture's name on channel 777, and you're good to go. No need for updating every time a new host is added. Also note that using this method, you can just speak the texture's UUID, and never have to modify the object's contents at all. With UUIDs, you don't need the texture present in the object's inventory.
|
|
Bitzer Balderdash
Dazed and Confused
Join date: 21 Dec 2005
Posts: 246
|
07-24-2006 02:07
From: Xixao Dannunzio Also note that using this method, you can just speak the texture's UUID, and never have to modify the object's contents at all. With UUIDs, you don't need the texture present in the object's inventory. Also of note, you can make up a gesture that maps an easy "/" command that you type into a speak of the correct UUID on the correct channel, so you don't need to look up the UUIDs each time
|
|
Xixao Dannunzio
Owner, X3D Enterprises
Join date: 20 Mar 2006
Posts: 114
|
07-24-2006 02:09
Didn't think of that. Good idea.
|
|
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
|
07-24-2006 02:32
Probably easier is the object just changes the texture to which ever the host's name is when touched. Not need to type, make gestures or anything. If the toucher's name doesn't match, it simply does nothing. If the host touches it again when showing their texture, then the texture is changed to the off texture. Simple, easy and intuitive. If more hosts arrive or depart, maintenance simply becomes changing the pictures to match the new hosts and to remove the old. No script changes needed.
|
|
Xixao Dannunzio
Owner, X3D Enterprises
Join date: 20 Mar 2006
Posts: 114
|
07-24-2006 02:35
From: Angela Salome Probably easier is the object just changes the texture to which ever the host's name is when touched. Not need to type, make gestures or anything. If the toucher's name doesn't match, it simply does nothing. If the host touches it again when showing their texture, then the texture is changed to the off texture. Simple, easy and intuitive. Actually, not the simplest way... It would require additional coding to prevent the object from attempting to load a non-existent texture when someone other than a recognized host touches it. Then you have the additional code required to check its current state and switch to the off state. Unless Marlon is an experienced coder, this suggestion would further complicate the task.
|
|
Lizard Green
Reptillian
Join date: 28 Jun 2006
Posts: 20
|
07-24-2006 06:19
From: Marlon Brocco This worked! Thanks so much..... you rock! just so you know, it's because you were missing the last 2 braces (1 to close the listen event, 1 to close the default state).
|