llRezBullet

From Second Life Wiki
Jump to navigation Jump to search
Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: llRezBullet( string inventory, vector position, vector velocity, rotation rotation, float damage, list impact_particle, string impact_sound, float impact_volume );

Instantiate inventory object (fire a bullet) at position with velocity velocity and rotation rotation, with the amount of damage that will be applied when this object hits a target showing impact_particle effect and playing impact_sound at impact_volume volume.

• string inventory an object in the inventory of the prim this script is in, as in llRezObject().
• vector position position in region coordinates to place the object.
• vector velocity initial velocity (max magnitude is approximately 200m/s).
• rotation rotation initial rotation.
• float damage range: 0.0 (no damage) ~ 100.0 (instant kill).
• list impact_particle particle system rules list, as in llParticleSystem().
• string impact_sound a sound in the prim's inventory, UUID of a sound or an empty string.
• float impact_volume between 0.0 (silent) and 1.0 (loud).

Caveats

  • If inventory is missing from the prim's inventory or it is not an object then an error is shouted on DEBUG_CHANNEL.
  • All bullet scripts always ignored.
  • Bullet is a temporary and phantom object.
  • Bullet motion calculated in specific way using ray-tracing technique to detect possible target on each step. Bullets has a high priority in physics calculations.
  • Bullet artificially produces single collision/damage event on target (i.e. no collision_start/collision_end events). Bullet automatically deleted after collision.

Examples

Deep Notes

Signature

//function void llRezBullet( string inventory, vector position, vector velocity, rotation rotation, float damage, list impact_particle, string impact_sound, float impact_volume );