Jump to content

Biscoito Bonetto

Resident
  • Posts

    1
  • Joined

  • Last visited

Reputation

1 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, I'm new in scripts and I'm trying to make a menu that will change the textures of multiples objetcs. For example: For object01: texture01, texture02 and texture03. For object02: texture04 and texture05. My question is how to communicate these objects to a menu? To test it, I put this script in one object to make the menu: list texturechoices = ["texture01", "texture02", "texture03"]; string msg = "Please make a choice."; key ToucherID; integer channel_dialog; integer listen_id; default { state_entry() { llSetScriptState("texturedefault", TRUE); channel_dialog = ( -1234 * (integer)("0x"+llGetSubString((string)llGetKey(),-5,-1)) ); } touch_start(integer total_number) { ToucherID = llDetectedKey(0); llDialog(ToucherID, msg, texturechoices, channel_dialog); listen_id = llListen( channel_dialog, "", ToucherID, ""); } } And this script in other object to receive the commands of the menu: default { state_entry() { llListen(-1234,"","",""); llOffsetTexture(0, 0, -1); llSetTexture("texturedefault", ALL_SIDES); } on_rez(integer start_param) { llResetScript(); llOffsetTexture(0, 0, -1); llSetTexture("texturedefault", ALL_SIDES); } listen(integer c,string n,key id, string m) { if(m == "texture01") { llOffsetTexture(0, 0, -1); llSetTexture("texture01", ALL_SIDES); } if(m == "texture02") { llSetTexture("texture02", ALL_SIDES); } if(m == "texture03") { llOffsetTexture(0, 0, -1); llSetTexture("texture03", ALL_SIDES); } } } Sure, It didn't work. But I think that the problem is only with menu and how to communicate it with multiples objects using llListen. Thanks for your time!
×
×
  • Create New...