User Tools

Site Tools


4rpl:commands:destroyallattachedbeams

Index
Beams

DestroyAllAttachedBeams

DestroyAllAttachedBeams(<-unitUID)

Description

Destroys all beams attached to a unit. Destruction permanently removes the beam. Note that beams that are attached to units are automatically destroyed when the unit is destroyed.

Examples

once
   GetUnitPosition(self) ->unitPos
   #Fire a beam to extends off screen but is at the same height as the unit
   #We will attach the beam to ourselves, so that the start point is relative to our unit
   3 ->brightness
   4 ->width
   CreateBeam("orange" <-brightness <-width) ->beam
   AttachBeam(<-beam self "")
   SetBeamStart(<-beam V3(0 0 0))
   SetBeamEnd(<-beam V3(10000 0 10000))
endonce
 
if (GetUnitUpdateCount eq (900))
   DestroyAllAttachedBeams(self)
endif

Index

4rpl/commands/destroyallattachedbeams.txt · Last modified: 2021/04/15 12:33 by Karsten75