childhoodbestfriend489 Posted March 14, 2021 Share Posted March 14, 2021 (edited) Is there any script in SecondLife which enables two objects to send and receive messages each other? What's that? Edited March 14, 2021 by childhoodbestfriend489 Link to comment Share on other sites More sharing options...
Jenna Huntsman Posted March 14, 2021 Share Posted March 14, 2021 Have a look at this wiki page: http://wiki.secondlife.com/wiki/LlRegionSayTo llRegionSayTo is an LSL function which allows 2 objects to communicate with eachother. 1 Link to comment Share on other sites More sharing options...
Quistess Alpha Posted March 14, 2021 Share Posted March 14, 2021 If your objects are in different regions, you can either llShout() over the region border (I've never actually tried this, but I'm fairly certain it works) or use llEmail(). http://wiki.secondlife.com/wiki/LlShout or http://wiki.secondlife.com/wiki/LlRegionSayTo pair with: http://wiki.secondlife.com/wiki/Listen and http://wiki.secondlife.com/wiki/LlListen -- http://wiki.secondlife.com/wiki/LlEmail goes with http://wiki.secondlife.com/wiki/Email Link to comment Share on other sites More sharing options...
childhoodbestfriend489 Posted March 14, 2021 Author Share Posted March 14, 2021 Pet and food are connected in this way Link to comment Share on other sites More sharing options...
childhoodbestfriend489 Posted March 14, 2021 Author Share Posted March 14, 2021 Couldn't connect two objects. I need two demo scripts for each objects. Link to comment Share on other sites More sharing options...
Profaitchikenz Haiku Posted March 14, 2021 Share Posted March 14, 2021 (edited) This pair of scripts will allow pets to call for food and get sent to a single food bowl. // pet script integer foodChan = -11223344; integer foodChanHandle; key food = "change this to be the actual UUID of food"; vector whereFood; default { state_entry() { foodChanHandle = llListen(foodChan, "", "", ""); llRegionSayTo(food, foodChan, "hungry"); } listen(integer ch, string name, key id, string msg) { if( id == food) { whereFood = (vector) msg; if( whereFood != ZERO_VECTOR) llSetRegionPos(whereFood); } } } // food script integer foodChan = -11223344; integer foodChanHandle; default { state_entry() { foodChanHandle = llListen(foodChan, "", "", ""); } listen(integer ch, string name, key id, string msg) { if( msg == "hungry) llRegionSayTo(id, foodChan, (string) llGetPos() ); } } Edited March 14, 2021 by Profaitchikenz Haiku Link to comment Share on other sites More sharing options...
childhoodbestfriend489 Posted March 14, 2021 Author Share Posted March 14, 2021 (edited) Worked Profaitchikenz Haiku Edited March 14, 2021 by childhoodbestfriend489 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