|
Naima Aya
Registered User
Join date: 8 Aug 2007
Posts: 10
|
07-05-2008 20:52
Hi there, I wonder know what I didn't got yet. I'm making a HUD to change some textures, glow and color from some prims. on the HUD i'm using the llGetInventoryName(INVENTORY_TEXTURE, i); to build the menu and then: string texture = llGetInventoryName(INVENTORY_TEXTURE, 0); key textkey = llGetInventoryKey(texture); llSay(-1001,(string) textkey);
to get the texture key and send it to the channel -1001 on the reciever I have:
default { state_entry() { llListen(-1001, "", NULL_KEY, "" ); } on_rez(integer num) { llResetScript(); }
listen(integer number, string name, key id, string message) { if(message!="") { llSetTexture(message, ALL_SIDES); } }
}
but not working, anyone give me some light please
|
|
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
|
07-05-2008 22:51
llSetTexture(message, ALL_SIDES);
"message" here is still a string, even though it contains the same characters as a texture key. Cast it as a key first and I think it will work - just like you had the HUD cast it as a string in the first place.
llSetTexture((key)message, ALL_SIDES);
_____________________
Designer of sensual, tasteful couple's animations - for residents who take their leisure time seriously.  http://slurl.com/secondlife/Brownlee/203/110/109/ 
|
|
Naima Aya
Registered User
Join date: 8 Aug 2007
Posts: 10
|
07-06-2008 04:16
From: Anti Antonelli llSetTexture(message, ALL_SIDES);
"message" here is still a string, even though it contains the same characters as a texture key. Cast it as a key first and I think it will work - just like you had the HUD cast it as a string in the first place.
llSetTexture((key)message, ALL_SIDES); Ty, but still don't work, on target prim that is listening the channel return "missing image". I just want to sender say on the channel the chosen UUID texture and receiver use the llSetTexture from that UUID, the texture has all perms. note: I've checked the llSay(-1001,(string) textkey); and that says the UUID from the selected texture
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-06-2008 05:12
Just an idea. You know you have to have FULL PERMISSIONS on an item to get its UUID with llGetInventoryKey()? You might want to make sure you have those permissions on the texture item in prim inventory and that the key being received is valid (not NULL_KEY = "00000000-0000-0000-0000-000000000000" or something). Try a temporary llOwnerSay() in the receiving script to print out the value for debugging purposes.
|
|
Naima Aya
Registered User
Join date: 8 Aug 2007
Posts: 10
|
07-06-2008 12:42
From: Hewee Zetkin Just an idea. You know you have to have FULL PERMISSIONS on an item to get its UUID with llGetInventoryKey()? You might want to make sure you have those permissions on the texture item in prim inventory and that the key being received is valid (not NULL_KEY = "00000000-0000-0000-0000-000000000000" or something). Try a temporary llOwnerSay() in the receiving script to print out the value for debugging purposes. Ty Hewee, yes, the prims and most important the textures has all perms, my sender is ok now:
string item = message; key textkey = llGetInventoryKey(item); llSay(-1001, (string) textkey);
the result is channel -1001 says the UUID from a selected texture on the menu, ok, but my receiver listen on channel the texture name and not the UUID, I've checked with llsay on public channel to see the string result. lmao this is my second nightmare.. the receiver
default { state_entry() { llListen(-1001, "", llGetOwner(), "" ); } listen(integer number, string name, key id, string message) {
if(message!="") { llSay(0, (key) message); llSetTexture((key) message, ALL_SIDES); } }
}
Ok changes the texture but returns an error "Reciever Texture Tail: Could not find texture 'power'." :/ "adding" I've tried llSetTexture((key) message, ALL_SIDES); as mentioned but result is the same, change the texture but report that can't find the "texture name?"
|
|
Naima Aya
Registered User
Join date: 8 Aug 2007
Posts: 10
|
07-06-2008 13:46
lol ops, sorry found the problem, after cook my brain  the integer MENU_CHANNEL = -1003; to llDialog was using the same channel as the llSay to receiver , uffff, bread 2 times, /me go to next task. Thanks a lot 
|