Lemar6000 Posted March 21, 2019 Share Posted March 21, 2019 Help Please ... This first part is a segment of a menu driven texture changer script that is "Touch Start" and I am trying to get it to start form a Link Message from Menu in the same prim. This script does work. default { state_entry() { composelist(); //make list from inventory textures } touch_start(integer total_number) { user = llDetectedKey(0); menu(user,"Please select one below.",texture_list); } listen(integer channel,string name,key id,string message) { if (channel == menu_channel) { llSetTimerEvent(0.0); llListenRemove(menu_handler); if(message == "Next Page") { menu(user,"Please select one below.",texture_list2); } else if(message == "Last Page") { menu(user,"Please select one below.",texture_list); } else { llSetTexture(message, side); } } } This is the same segment that I have tried to modify to start with a Link Message. The Bold area is the part I changed. The Menu never appears. Any Ideas? default { state_entry() { composelist(); //make list from inventory textures } link_message( integer sibling, integer num, string mesg, key target_key ) { if (mesg == "texture") { user = llDetectedKey(0); menu(user,"Select a Texture .",texture_list); } } listen(integer channel,string name,key id,string message) { if (channel == menu_channel) { llSetTimerEvent(0.0); llListenRemove(menu_handler); if(message == "Next Page") { menu(user,"Please select one below.",texture_list2); } else if(message == "Last Page") { menu(user,"Please select one below.",texture_list); } else { llSetTexture(message, side); } } } Link to comment Share on other sites More sharing options...
KT Kingsley Posted March 21, 2019 Share Posted March 21, 2019 The llDetected* functions (as in user = llDetectedKey (0)) don't work in a link_message event, so the user you're targeting is the NULL_KEY. Make sure that the script that's sending the link message has the key for the target user in the key parameter of the llMessageLinked function, something like: llMessageLinked (LINK_SET, 0, "texture", llDetectedKey (0)), and then use that parameter in the call to your menu function: menu (target_key, "Select a Texture.", texture_list). Link to comment Share on other sites More sharing options...
Lemar6000 Posted March 21, 2019 Author Share Posted March 21, 2019 Perfect! Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now