Talk:Wanderer

From Second Life Wiki
Jump to: navigation, search

Hi Kira,

I've been following your efforts and first off I'd like to say thanks on behalf of the people who will find these goodies useful.

I was just looking at this script with great interest, as it fits a particular need that I am working on, so the timing is quite fortuitous. I did however notice a possible issue that may arise. Should the wanderer go off a sim into the wild... it won't die. Also something to ponder adding in, is parcel containment to restrict the wanderer from travelling onto others parcels.

Just a couple of thoughts :) Have a Terrific Day & Thanks again for posting in these goodies. WS


Hello, thank you! I'm sorry, I've never really checked the discussions tabs so I'm catching up. The Wanderer script should contain itself within the limits of MOVEMENT_RANGE so you could actually measure how how far you need it to travel and avoid that problem. The Wanderer script does not exceed the range specified by MOVEMENT_RANGE, it just selects random points within a geometric shape, starting from the first point where the script activated and travels to them. Thus, its movement will be limited between "initial point" and MOVEMENT_RANGE. It should not progressively stray away from that distance.

For example, if you wanted to script a bird, you could measure the range you would like it to fly in and then set MOVEMENT_RANGE to that. It should never move beyond that.


However, if you do want the object to delete itself, try this in the object that will use the Wanderer script:

<lsl> llSetStatus(STATUS_DIE_AT_EDGE, TRUE); </lsl>

which should delete the object if it hits the edge of the SIM (STATUS_DIE_AT_EDGE). Or you can even make it return with:

<lsl> llSetStatus(STATUS_RETURN_AT_EDGE, TRUE); </lsl>

This should be set somewhere in the object using he Wanderer script, somewhere in the state_entry() or on_rez() event.

Kira Komarov 09:32, 23 November 2011 (PST)