Jump to content

Hand greanade


Tattooshop
 Share

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

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

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
Link to comment
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
Link to comment
Share on other sites

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