Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sensor?

Jenny Carlos
Registered User
Join date: 30 Aug 2005
Posts: 52
10-16-2005 10:39
Hello im working on a script where an item will follow you around rather much like a pet.
Id like to be able to use a string value to determine who the person is to follow from
the detected list of agents.

I figured I could do this with the name or key of the sensor but dont seem to be working.

("aa", bb, AGENT, 25, PI)
aa = my guess name for only objects as I cant seem to get
it to work for agents,
bb = key im guesing is the id key of the avatar to search for?

Id really like some basic script examples if anyone would have any or even solution to
how to sort and pick and chose what agents for my follower to follow.

It appered to return a number value rather then agent info?

Im looking to add this to on_rez so that it just starts to follow the person that is located
in the string value.

Thanks for any help
Jenny Carlos
Judah Jimador
Registered User
Join date: 13 Mar 2005
Posts: 230
10-16-2005 11:01
Hi, Jenny,

Do you plan to allow your Pet Thingy to be assigned to follow others around, or is it only going to follow its owner?

Here's an example that may help.

-- jj
Jenny Carlos
Registered User
Join date: 30 Aug 2005
Posts: 52
10-16-2005 11:03
Ive got allready working to follow just me around /
I need to have a string value that determines the person it follows.
Jenny Carlos
Registered User
Join date: 30 Aug 2005
Posts: 52
10-16-2005 11:09
Its going to take an on_rez value from another object rezzing it.
The first object will control where the rezed object will follow.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
10-16-2005 11:23
Don't use on_rez, because you can only pass an integer in, like you said. Once the new object has rezzed, have it open a listener on some high channel number. You could use on_rez to pass in the channel number, that way you can have the rezzer object gnerate a random channel number each time. The rezzer gets to know that the new object has been rezzed in its object_rez event. Have it sleep for a second (to give teh child object time to start running its script and set up the listener), then have the rezzer say the key (as a string, of course), on the selected chat channel. Pick this up in the listener in the child object, and you have your key that you can then use to follow the other person. If you want to be able to change the target on the fly, you'll need to keep the listener open. Otherwise, you can turn off the listener once you've received the key-string.
Jenny Carlos
Registered User
Join date: 30 Aug 2005
Posts: 52
10-16-2005 11:47
Ok ill just come out and say what im making.
Im working on guided missles for a launcher.
This has to take place rather fast .
Im not sure how others are doing this.
Like you said it will only pass integer or float values from one rezzer to rezzed object.

The returned scan is of avatars number,
I was considering useing a menu system that would convert the detected to names on
the gun and you could chose the persons name you wanted it to go after then send the
number of the proper agent to the rezzed object / but what if the person moves while setting this up and the
number alotments change due to distance change?