Jump to content

Vehicle sensor object rezzer


Preston Beresford
 Share

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

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

Recommended Posts

I have a 4 seater vehicle that travels on a specific path.  At a certain point in the path, I need a rezzer that will sense the vehicle's presence, rez one copy of an object from the contents, then reset and wait for the next vehicle to be sensed before rezzing another one.  I can't seem to find something that does this task.  The scripts I've tried either don't rez anything, or rezzes multiple copies.  I'm more of a builder than a scripter, so I really don't have the expertise in this area.  Any help would be greatly appreciated! 

Link to comment
Share on other sites

Hm. Rez and give, or rez and leave in world, or rez in world as temporary, or what?

I have a demo motorcycle rezzer which checks that you've driven away the motorcycle before rezzing another one in the same place. Some rezzers botch this; there's one for swan boats which has that problem. When rezzing is slow, people will click it more than once and get a pile of swan boats. Use llCastRay to check for empty space before rezzing. This prevents rezzing if anything is blocking the rez area. Not sure if that's what you want.

It's not hard to do this, once you figure out exactly what you want to happen.

  • Like 1
Link to comment
Share on other sites

The post talks about rezzing something other than the vehicle itself, at one point in its travel path. Seems pretty straightforward for a beginning scripter, but the "sensing" technology can differ in impact on sim performance: 

  • Best case, I think, would be an llVolumeDetect() prim with which the vehicle collides, assuming the location ownership allows rezzing such a thing (either on or encroaching through the space).
  • Just about as good, I imagine, would be a change in the scripting of the vehicle to have an appropriate llTarget() and then when at_target() either rez its own thing or chat to trigger a nearby rezzer. 
  • Failing both of those possibilities, I'd probably have the rezzer llCastRay() down the path to detect and identify the approaching vehicle, then closely monitor its progress with OBJECT_POS (or maybe just time the rezzing to coincide with the vehicle's predictable motion from the time and position of detection). 
  • Worst case, but probably most likely for a beginner, would be llSensorRepeat() to do more or less the same as raycasting but using more resources.
Link to comment
Share on other sites

I keep this things simple. A vehicle knows where it is and sends a message to the rezzer when it's at the right spot.

For multiclick I usually take the time when the task is done and all touches within that time +0.75 sec (time depends on use case) are dumped. Effectively counters twitching mouse-fingers.

For rezzers - they send the derez command (by whisper) b4 rezzing new stuff. Vehicles of course usually don't listen for derez commands (maybe they should until moved) - just wanted to mention alternatives - it depends on the special case what makes sense.

 

  • Thanks 1
Link to comment
Share on other sites

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