User Tools

Site Tools


4rpl:commands:destroyallattachedbeams

This is an old revision of the document!


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 ourselfs, so that the start point is relative to our unit
   CreateBeam("orange" 3 4  0 1 0  10000 <-unitPos.Y 10000) ->beam
   AttachBeam(<-beam self)
endonce
 
if (GetUnitUpdateCount eq (900))
   DestroyAllAttachedBeams(self)
endif

Index

4rpl/commands/destroyallattachedbeams.1618492105.txt.gz · Last modified: 2025/02/14 14:56 (external edit)