Jump to content

Does anything only if it is near


Assmay
 Share

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

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

Recommended Posts

Hello ;)

 

I´m trying to script a simple game and in this game prople have attached a kind of hat.

This hat (not hud, i really mean a hat ;) ) changes color at special events - now I have the problem that only hats in 5m range around the item should change color... So I need something like "if agent range is smaller than 5m than do" operation but sensor looks complicated ;)

 

I appreciate every hint *kiss*

Link to comment
Share on other sites

You could either run a sensor that only detects people within 5m, or you could detet people anywhere and just periodically llWhisper a color change command. Only people/objects who are very close will hear a whispered command.  Neither of those is very hard to script, even for a beginner.

Link to comment
Share on other sites

llSensor triggers a sensor event, as indicated in the LSL wiki.  In the sensor event itself, you may gather whatever information you need about the detected object:  llDetectedKey(), llDetectedName(), llDetectedPos(), llDetectedRot(),.... , just as you can with any touch* or collision* event.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3485 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...