User Tools

Site Tools


4rpl:commands:setbeamend

This is an old revision of the document!


Index

SetBeamEnd

SetBeamEnd(<-beamUID <-end)

Description

Set a beam's vector ending position in 3D space. For an unattached beam, the ending coordinates are in world space. This means that 0,0,0 is in the lower left of the map. The endY coordinate is the height above the terrain and endX is along the right/left direction of the map and endZ is the forward/back direction. For a beam that is attached to a unit, the end position REMAINS IN WORLD COORDINATES unless the beam has been set to SetBeamForceLocalEnd.

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 1  V3(0 1 0)  V3(10000 <-unitPos.Y 10000)) ->beam
   AttachBeam(<-beam self)
endonce
 
SetBeamEnd(<-beam V3(100 <-unitPos.Y 100)) #Move the end of the beam to point at 100,unitY,100 on the map.
endif

Index

4rpl/commands/setbeamend.1610121708.txt.gz · Last modified: 2021/01/08 11:01 by 127.0.0.1