Jump to content
Tattooshop

Hand greanade

Recommended Posts

Well, no, you can't just move it, because the llDetected* functions have no meaning in a timer event, since timers don't detect stuff.  And it wouldn't make sense to get rid of the sensor because how else would you get the victim's UUID and position?

The whole reason that you put a timer in the script, I assume, is so that it doesn't explode prematurely ... in your hand.

  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, Tattooshop said:

is it possible to somehow start the process without a sensor with a timer

as Rolig mentioned the sensor is need to detect any target agents

a way to do a grenade without a timer

1) launch/throw the grenade from the rezzer. Set the rotation and velocity of the grenade in the rezzer with llRezObject
2) when the grenade collides with anything (collision_start) then in the grenade script

default
{
   collision_start(...)
   {
      .. play the particles and sounds ...
   
      .. sensor one sweep
      llSensor(...);
   }

   sensor(..)
   {
      ...loop thru detected and push them ...
 
     .. kill the grenade ..
     llDie();
   }
   
   no_sensor()
   {
     .. kill the grenade ..
      llDie();
   }
}

battlefield simulation: use TEMP_ON_REZ rather then llDie(). When TEMP_ON_REZ kills the grenade before the script can complete then the grenade is a dud. So chuck another one 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

May I mention the land_collision_start event here: unlike collision_start this is triggered by a collision with the ground.

  • Thanks 1

Share this post


Link to post
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.


×
×
  • Create New...