Jump to content

Collision based unsit


KristaKayLynn
 Share

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

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

Recommended Posts

I think the way I'd do it is have the projectile, when it hits the tank,  tell the tank to unsit the driver.    Otherwise you're going to risk unsitting the driver if you drive over a minor obstacle, which probably isn't what you want to.

So, have the tank listening on a channel of your choice and then, when the projectile hits something, it tells  llDetectedKey(0), using llRegionSayTo() on the chosen channel, that it's hit it.    If the object it's hit is the tank, it interprets the message as meaning it should unsit llAvatarOnSitTarget(), if there is an avatar sitting on it.

Does that help, or do you need more detail?   

Link to comment
Share on other sites

26 minutes ago, KristaKayLynn said:

but what if you dont own the tank?  is there a way to do it then?

 

Sure, it just depends if you have the tank set up to allow non-owners to drive or sit on it.Now if you have multiple people sitting on it, that would require some more logic to tell it who to knock off if you don't want to knock everyone off. But as said above use llRegionSayTo in the projectile to tell the tank that the projectile hit it. Owner or not shouldn't matter.

If the tank is to shoot it's own projectile, I would use llGetObjectDetails(llGetKey(),[OBJECT_REZZER_KEY]), extract the key and save it as a global. Once the projectile hits where it's going to hit, check to make sure the llDetectedKey(x) != rezzerkey

Link to comment
Share on other sites

1 minute ago, KristaKayLynn said:

i dont own the tank, but i want it so my bullets, or grenades would make them unsit.  I hope that makes sense. 

Ah I see. Then right, unless it's modified to listen for your bullets, or if you own the land that it's on, there's not really any other way that I know of

Link to comment
Share on other sites

llUnSit

Function: llUnSit( key id );

 
220 Function ID
0.0 Forced Delay
10.0 Energy

The agent identified by id is forced to stand up if any of the following apply:

  1. The agent is sitting on the scripted object
  2. The agent is over land owned by the scripted object's owner and/or a group the owner has land rights for.
• key id avatar UUID that is in the same region  
Link to comment
Share on other sites

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