Jump to content

Set Range Limits to a Projectile?


amarock Amat
 Share

Recommended Posts

It's going to be imprecise no matter which way you do it.  It you don't like relying on speed, use distance.  llVecDist(llGetPos(),start_pos) will tell you where the object is relative to its starting point, if you saved its start_pos on rez.  You'd need to run a fast timer to sample the distance as the object flies.  I'm not aware of any unreliability in llDie.

Link to comment
Share on other sites

You are not going to throw your projectile by hand with a speed greater than 10m/s and even for that you should have an enormous strength. So discounting deceleration, which should be negligible, it will take your hand grenade 4 sec to fly 40 meters. so put on timer for 4 sec and llDie() after it.

There is no unreliability in llDie(). what you've heard but didn't understand is that it takes undetermined number of microseconds for a server to fully process llDie() and delete the object so some code lines immediately following llDie() in the script still can be executed. That is why it is recommended to follow llDie() with llSleep(0.5)...that creates a time buffer for an object to die peacefully without executing any additional code.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...