llInstantMessage only within 10 m distance ?

Creating scripts
Post Reply
User avatar
Min Tigerpaw
Posts: 223
Joined: Sun Mar 24, 2013 3:52 pm
Has thanked: 332 times
Been thanked: 160 times

llInstantMessage only within 10 m distance ?

Post by Min Tigerpaw »

I'm working for a friend on adaption of a SL-script for sending notification-messages to region-owner & staff when a visitor comes close.
It works great finally but: the IM is only received if the receiving avatar is within 10 m of the object with the sensor script ! :evil:
No IM is received if the distance is larger or the avi is in another region. :?: :?:

Is this a known issue - or something wrong with my code?
User avatar
Ilan Tochner
Posts: 6518
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4969 times
Been thanked: 4469 times
Contact:

Re: llInstantMessage only within 10 m distance ?

Post by Ilan Tochner »

Is this a personal IM or one sent to nearby chat? (which has a range limit)
User avatar
Min Tigerpaw
Posts: 223
Joined: Sun Mar 24, 2013 3:52 pm
Has thanked: 332 times
Been thanked: 160 times

Re: llInstantMessage only within 10 m distance ?

Post by Min Tigerpaw »

Hmm ..Ilan ..the command sending the IM reads:

llInstantMessage(llGetOwner(), llDetectedName(i) + " has arrived at " + llGetRegionName());
or
llInstantMessage(staff2, llDetectedName(i)+ " has arrived at " + llGetRegionName());

Thus it should be a personal IM to the object owner / or the staff-member identified by key staff2 .
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1142 times

Re: llInstantMessage only within 10 m distance ?

Post by Graham Mills »

Perhaps the problem lies with the sensor?
Min Tigerpaw wrote:Hmm ..Ilan ..the command sending the IM reads:

llInstantMessage(llGetOwner(), llDetectedName(i) + " has arrived at " + llGetRegionName());
or
llInstantMessage(staff2, llDetectedName(i)+ " has arrived at " + llGetRegionName());

Thus it should be a personal IM to the object owner / or the staff-member identified by key staff2 .
These users thanked the author Graham Mills for the post:
Min Tigerpaw
User avatar
Min Tigerpaw
Posts: 223
Joined: Sun Mar 24, 2013 3:52 pm
Has thanked: 332 times
Been thanked: 160 times

Re: llInstantMessage only within 10 m distance ?

Post by Min Tigerpaw »

Great idea Graham :idea: ..and you're right:
The IM is triggered from within a sensor event.
The distance the IM carries is exactly the distance defined in the range parameter of the llSensorRepeat function. :!:

But why is it like this ? ... doesn't make sense for me. :?: (only if the sensed avatar should be addressed which is not the case)
How can I make the IM carry longer distance and across regions? :?:
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1142 times

Re: llInstantMessage only within 10 m distance ?

Post by Graham Mills »

Well, I guess you could extend the reach of the llSensorRepeat (maximum: 96 m in SL) to detect more avatars. If you wanted to scan the whole region then there is osGetAgents or osGetAvatarList. No idea whether any of this works on a 2x2 etc.
These users thanked the author Graham Mills for the post:
Min Tigerpaw
User avatar
Min Tigerpaw
Posts: 223
Joined: Sun Mar 24, 2013 3:52 pm
Has thanked: 332 times
Been thanked: 160 times

Re: llInstantMessage only within 10 m distance ?

Post by Min Tigerpaw »

Finally I could sort this out: :lol:
the llInstantMessage command works as it should, if triggered from a touch-event or from a timer-event
- however if triggered from a sensor-event, it will only work within the same region and for the distance set in the range-parameter of llSensorRepeat.
Not sure if this is intentionally like that in OpenSim (not sure about behavior SL)
Thus to solve the visitor registration & IM-message X-region to owner/staff I scripted a workaround that works nicely now and is in beta-testing.
I'll make it available in Kitely Market and @ my sandbox soon, when it has been testet more thoroughly.
These users thanked the author Min Tigerpaw for the post:
Graham Mills
Post Reply