Pixellada Posted September 5, 2012 Share Posted September 5, 2012 HiI have two scripts one for hud that changes the texture:string texture1 = "d1ccf901-14e1-e78f-52d6-d6d0beyyyxxx";string texture2 = "dndfdsnf-14e1-e78f-52d6-d6d0beyyyxxx"; default { state_entry() { llSetTexture(texture1, ALL_SIDES); } touch_start(integer total_number) { llSay(2,texture2); } } and one for object that receive the information about texture key and changes thexture of the object:default { state_entry() { llListen(2, "", NULL_KEY, ""); } listen(integer channel, string name, key id, string msg) { if (channel == 2) llSetTexture(msg, ALL_SIDES ); } } Of course channel 2 is not recomended - that is example only.I would like to:1. make the object to listen only what owner of hud says2. intruduce note card that includes key of textures - the script in hud can read keys from note card3. the script in hud chooses the note card with the same name as object in which that script is (if script is on object named "1" it chooses note card name "1". Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted September 5, 2012 Share Posted September 5, 2012 I don't really your script samples, but I can try toanswer your questions: Use the key of the owner (using llGetOwner()) in the llListen command - read up here Look up here how to read a notecard - the examples should be very helpful To do so, just use llGetObjectName in die function mentioned in 2 Link to comment Share on other sites More sharing options...
Pixellada Posted September 5, 2012 Author Share Posted September 5, 2012 Thank you for answer. Concerning 1 - is that correct? Listening script default{ state_entry() { llListen(2, "", llGetOwner(), ""); } listen(integer channel, string name, key id, string msg) { if (channel == 2) llSetTexture(msg, ALL_SIDES ); } } Do I need to add llOwnerSay to hud script? string texture1 = "d1ccf901-14e1-e78f-52d6-d6d0beyyyxxx";string texture2 = "dndfdsnf-14e1-e78f-52d6-d6d0beyyyxxx";default{ state_entry() { llSetTexture(texture1, ALL_SIDES); } touch_start(integer total_number){ llOwnerSay(2,texture2); }} Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted September 5, 2012 Share Posted September 5, 2012 First question - yes, that's correct Second question - no. llOwnerSay is to say things just to the owner of an oject - others - including HUDs, don't hear it - and: you can't pass the fuction a channel 1 Link to comment Share on other sites More sharing options...
Pixellada Posted September 5, 2012 Author Share Posted September 5, 2012 Thank you. What scripts are needed if the note card with keys is not in the same prim as script just in other linked prim? Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted September 5, 2012 Share Posted September 5, 2012 You can only read a nc in the same prim. But scripts can comminate in an object by using llMessageLinked - so if the nc is in prim A and you need the keys in prim B, you woud put script a in prim A and script b in prim B. a would read the card and send the information to b 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