Zermes Vindaloo
Registered User
Join date: 30 Aug 2004
Posts: 14
|
10-22-2005 13:28
OK, so i have this simple script i prepared for a client, for a drapery. open and shut commands on channel 8 change it naturally from open to closed. HOWEVER, its not staying on the open texture with the command. It will flash open, then go back to the closed texture, and i am not amused about it at all, since i have done this type of script numerous times. Also had same trouble last evening with coloring. Here is the script i wrote......... naturally, it does not look like this in world. Its 126pm game time and I am IN world, If you can help PLEASE IM me. default { state_entry() { llListen(8,"","","open"  ; llListen(8,"","","shut"  ; } listen(integer chan, string name, key id, string message) { if(message = "open"  { llSetTexture("Drapes", ALL_SIDES);} if(message = "shut"  { llSetTexture("Drapes - Closed", ALL_SIDES); } } }
|
cua Curie
secondlifes.com/*****
Join date: 14 Nov 2003
Posts: 196
|
10-22-2005 13:35
You need double equal signs for comparison: default { state_entry() { llListen(8,"","","open"); llListen(8,"","","shut"); }
listen(integer chan, string name, key id, string message) { if(message == "open" { llSetTexture("Drapes", ALL_SIDES);}
if(message == "shut" { llSetTexture("Drapes - Closed", ALL_SIDES); } } }
|
Zermes Vindaloo
Registered User
Join date: 30 Aug 2004
Posts: 14
|
10-22-2005 13:47
OH GEES I KNEW THAT !!!
Thanks for pointing it out !!
|