Jump to content

LSL_Help_Post_6


You are about to reply to a thread that has been inactive for 1281 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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

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 by Profaitchikenz Haiku
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1281 days.

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
 Share

×
×
  • Create New...