Jump to content

Collision detect while seated


Artorius Constantine
 Share

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

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

Recommended Posts

If you don't like collisions, you could look at the problem from the other end. Run a repeating sensor in the FX script (or use llGetAgentList and fliter by distance) to tell when an avatar is within range.  If you really need to confirm whether the detected avatar is in a boat and not watching boats from the shoreline, send a ping with llSay to all boats within chat range and see if any respond. If you detected an avatar and a boat in roughly the same area, shoot off the fireworks.

Link to comment
Share on other sites

I'm using llRegionSay and that's all good. The problem is I can't get the boat to trigger anything but a sensor.

I thought llVolumeDetect or  Collision Filter by object name would do it but nothing reports any collisions.

I should be clearer about the seated avatar, There will only be a boat with an avatar, they don't travel empty. I guess they could but the rezzer needs a touch to create one so normally that's not an issue.  I don't need to check that, just when the boat reaches x,x,x  location or collides with an object so I can send the llRegionSay and drop the rocks lol.

 

I guess I'll look at a repeating sensor again. Grabbing the ava in range would be easy enough. I have just heard that they are really "server loader uppers" and was trying to stay away from them. I only have a Homestead so I want to keep script usage as low as I can.

Link to comment
Share on other sites

I don't understand why the collision event isn't working.   I assume you've got a regular prim set to llVolumeDetect(TRUE).  Make sure it's not also set to phantom -- rez a new prim to be sure.

How is the gondola propelled?  If it's using keyframed motion, remember that the collision prim needs to be physical.     As the wiki explains, 

Collisions with other nonphysical or keyframed objects will be ignored (no script events will fire and collision processing will not occur). Collisions with physical objects will be computed and reported, but the keyframed object will be unaffected by those collisions. (The physical object will be affected, however.)

I've been caught by that in the past.

If that doesn;t help, can you post the relevant bit of code, please, in case there's some strangeness with a filter there?

Link to comment
Share on other sites

Yeah I think it went phantom in an earlier attempt and I kept using it. Rezzed a new one =)

I can't make it physical. It's a prim floating in water and if it got physical & affected it'd probably get knocked over after the first hit.

Unless I rezzed a new one after every trigger. hmmm. I bet I could rez all the triggers and the FX with a llRegionSay when a boat is rezzed then nothing would be running unless someone is on the ride. Gotta think about that. They could die after being triggered or X  minutes. One effect being triggered could also RegionSay the next effect & trigger to rez. I bet that would reduce the script time a lot. No one on the ride then no open listeners or running sensors. hmmmm

The boat is using key-framed motion so that's why Volume detect didn't work. I thought it would still detect the avatar. The boat rezzes as phantom so coliisionFilter won't work. That's why I was trying to detect the avatar.

I got the sensor working great with a 2 meter sweep every 3 seconds it doesn't seem to be lagging anything down and the timing is pretty good. I guess that's the way to go.

I deleted all the earlier attempts, I'm like that. If it don't work toss it lol.

Now I'm fighting with the listeners but I think that's just lag. Usually those work great for me.

Link to comment
Share on other sites

Why does the prim need to float?    Why not have it solid and standing on the bed of the river, and then turn non-physical and phantom as soon as the boat collides with it?    Then turn physical and solid again a few  seconds later, after the boat has had time to pass through the prim.    Use llSetPos when you turn non-physical to move it back into position, and then llMove2Target when you turn back to physical and solid,  to ensure you're back in the correct position.     Since you can switch between physical/non-physical and solid/phantom in the same llSetLinkPPFast call, it shouldn't have time to move very far anyway.    You're just correcting for cumulative movement over time.

I've done that in the past when dealing with exactly this problem -- keyframed motion vehicle needing to collide with something to trigger special effects when it arrives at a particular point in the ride.   It worked well. 

Link to comment
Share on other sites

That's almost exactly what I finally did.

The boat rezzer now sends an llRegionSayTo to the first effect rezzer that rezzes the effect and the trigger. After being triggered that one then sends an llRegionSayTo to the next rezzer in line that rezzes the effect & trigger then dies. It also kills the effect so no prim litter or resetting of that now. Each effect and trigger is rezzed in a chain then goes away. If it doesn't get triggered the chain ends. No waste, no running listeners except the rezzers and they are listening for "object" & msg on -xxxxx channel. if no one is on the ride it is taking no script time at all. Love it!

The Pirates are popping off cannonballs perfectly! Now I just have to build all the FX lol

Thx everyone, I love this Forum!

Link to comment
Share on other sites

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