Jump to content

Tighern McDonnell

Resident
  • Posts

    31
  • Joined

  • Last visited

Everything posted by Tighern McDonnell

  1. default{ state_entry() { llListen(-25,"","",""); } listen(integer chan, string name, key id, string msg) { if (msg == "KFPadd") { llSay(0, "notes"); } if (msg == "KFPadd2") { llSay(0, "data"); } }} Snip 2 from my current script
  2. Yes I am still a newbie when it comes to the scripting. Been in SL for 5 years now but just taking on scripting. Here is what I am trying to do... Object A has a speak on channel X when touched. It says its description. Object B currently listens for that description and then says a line on public channel. Very simple... What I want to make it do is Object A stay the same... Object B, listen on channel for description, have that description be the name of the notecard on file in object B. Object B then reads the line contained on notecard... Where I am confused is I use a listen line in current setup... everytime i try and put that set of lines in the other script it doesn't work. key kQuery; integer iLine = 0; string notecard_name key notecard_key = NULL_KEY; config_init() { key nc_key = llGetInventoryKey(notecard_name); if (nc_key == notecard_key) { // Some other inventory item changed, not the configuration notecard. return; // Skip reading the notecard in this case. } // Remember the new notecard key from now on. notecard_key = nc_key; iLine = 0; kQuery = llGetNotecardLine(notecard_name, iLine); } default { state_entry() { // Read the notecard once at startup. config_init(); } changed(integer change) { if (change & CHANGED_INVENTORY) { // Read the notecard when the inventory has changed. config_init(); } } dataserver(key query_id, string data) { if (query_id == kQuery) { // this is a line of our notecard if (data == EOF) { llOwnerSay("Finished reading configuration."); } else { // TODO: handle notecard line here. For not just inform the owner. llOwnerSay("Read notecard line: " + data); // increment line count ++iLine; //request next line of notecard. kQuery = llGetNotecardLine(notecard_name, iLine); } } } } My question is how can i get the description from Object A and pass it along to Object B? This is a snip from a script in the wiki... really not sure where to go about it...
  3. Ok so have a very basic interaction script going. Object A is listening for string on channel x. When it hears it from Object B being touched, Object A then have three llSay lines to spit out... how to I make it so that they stay in order? I looked bout could not find a "wait" function. Maybe I am over looking something very simple. Thanks.
  4. That is very similar to a project I am working on. I saw this done very well and really enjoyed playing. It was a couple years back at Grendel's Children. I am not sure who the main developer was but I know all the main administrators there had a hand in it. You may want to see about contacting them. I have not done so yet but it is on my todo list to see if they can offer any advice on where to start.
  5. and then using variables have the table access a notecard with the same name as the object and read it in chat? Could it really be that simple?
  6. I have tried searching for something allready build and it looks like either I can't find it or just don't know what to really search for. I am a pure beginner at scripting myself and would love to come up with this myself but I don't think i will be able to write the first part of the code. I am sure I can modify it to fit the needs if that is avaliable. Ok on to what I am looking for. A system that will let me create objects that are single use (that part I can do) that when rezzed near another object (table) and clicked on it sends its name to the object and then delets itself. The table then "says" what the object is and a brief description... Basically the player finds something, picks it up, takes it back to the base, puts it on the table and the table analyzes it and gives a reading... Is there something like this out there avaliable?
×
×
  • Create New...