Jump to content

Collision, set unlinked prim to a different color, on no collision set to original color script?


Riodan
 Share

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

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

Recommended Posts

After digging through quite a bit of posts, scripts, etc, I am at a loss here on how I would go about this.. Basically, what I want to do is place a collideable prim (phantomed) inside a room on the floor to act as a pressure plate.  While the avatars are standing on the prim, it would set and keep the texture color of the prim 600 meters away on a status board lit red, once an avatar gets off the prim, the targeted prim would then return to it's normal green color.. 

My thoughts were to use the collision script, but I'm not sure how to target an unlinked prim on the same parcel to set the color of the prim to another color.  Can anyone help me out?

Link to comment
Share on other sites

The "pressure plate" needs to be a prim that uses llVolumeDetect and sends every status change to the indicator by using llRegionSay.

The indicator changes the color according to the received status messages.

If the "pressure plate" uses llVolumeDetect you can not link it. If it is required to be linked you need to use llSensor and a timer or llSensorRepeat.

Link to comment
Share on other sites

Communication is only part of the challenge.  As Kwak says, you can solve that one by using llRegionSay or llRegionSayTo for sending the command from your collision plate to the board that is meant to change color.  The bigger challenge will be keeping the color from flickering on and off as you move around, or as other people walk onto and off of the plate at the same time.  It's a little harder than you think at first.

Link to comment
Share on other sites

I tested llVolumeDetect lately. Is pretty reliable and no flicker. collision_start triggers if someone enters and collision_end triggers if nobody is in. The number of avatars is meaningless, only if the last one leaves collision_end will trigger. A non flickering detector is easy to script.

If the prim is 1m high - its sufficient - except someone jumps. But its possible to fill the room with that prim.

Prim is made invisible of course and llVolumeDetect will make it behave like phantom.

---

Update: I checked what I have done with llVolumeDetect

Not that easy, you need to have a list of all avatars and track who enters and leaves to make it multi-avatar-proof - well still not too difficult but maybe too much for a noob.

Link to comment
Share on other sites

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