User Tools

Site Tools


4rpl:commands:attachbeam

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:attachbeam [2021/04/15 12:23] Karsten754rpl:commands:attachbeam [2022/05/25 18:22] (current) – [Description] Continuous beams in motion. Vertu
Line 12: Line 12:
 The beam can only be attached to one unit at a time.  If you attach a beam to a new unit while it is already attached to some other unit, the beam will unattach from the old unit then attach to the new unit. The beam can only be attached to one unit at a time.  If you attach a beam to a new unit while it is already attached to some other unit, the beam will unattach from the old unit then attach to the new unit.
  
 +**Important note:** If you are planning to create a continuous beam on a unit that will be moving while firing, do not attach the beam to the unit. An attached beam will be unable to maintain the correct visual orientation and length. An unattached beam so long as its' start location is updated will retain a correct visual orientation.
 ===== Examples ===== ===== Examples =====
 <code 4rpl> <code 4rpl>
Line 17: Line 18:
    GetUnitPosition(self) ->unitPos    GetUnitPosition(self) ->unitPos
    #Fire a beam to extends off screen but is at the same height as the unit    #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+   #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    CreateBeam("orange" <-brightness <-width) ->beam
    AttachBeam(<-beam self "")    AttachBeam(<-beam self "")
 +   SetBeamStart(<-beam V3(0 0 0))
 +   SetBeamEnd(<-beam V3(10000 0 10000))
 endonce endonce
- 
 </code> </code>
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
  
4rpl/commands/attachbeam.txt · Last modified: 2022/05/25 18:22 by Vertu