Following ("Running") Beams - SmArtKar/AthenaFramework GitHub Wiki
Following ("Running") beams allow you to make beams similar to tesseron graser(using vanilla motes instead of athena's thingdefs) that instead of going through a predetermined path will follow their target around.
There are a few important notes:
stopBurstWithoutLos
has to be set to false
if you want your beam to keep following it's target after it has moved into cover
burstShotCount
determines how many tiles the beam would go through while chasing it's target, while ticksBetweenBurstShots
determines how many ticks it will take for a beam to travel through a single tile.
Just like with vanilla beams, beamMoteDef
must be a <ThingDef ParentName="MoteBase">
with <thingClass>MoteDualAttached</thingClass>
Here's an XML example of how they could be used in a gun
<verbs>
<li>
<verbClass>AthenaFramework.Verb_ShootRunningBeam</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<warmupTime>1.0</warmupTime>
<range>24.9</range>
<minRange>3.9</minRange>
<stopBurstWithoutLos>false</stopBurstWithoutLos>
<ticksBetweenBurstShots>27</ticksBetweenBurstShots>
<burstShotCount>10</burstShotCount>
<beamDamageDef>Beam</beamDamageDef>
<soundCastTail>GunTail_Medium</soundCastTail>
<muzzleFlashScale>9</muzzleFlashScale>
<soundCastBeam>BeamGraser_Shooting</soundCastBeam>
<beamGroundFleckDef>Fleck_BeamBurn</beamGroundFleckDef>
<beamFleckChancePerTick>0.32</beamFleckChancePerTick>
<beamMoteDef>Mote_GraserBeamBase</beamMoteDef>
<beamEndEffecterDef>GraserBeam_End</beamEndEffecterDef>
<beamChanceToStartFire>0.85</beamChanceToStartFire>
<beamChanceToAttachFire>0.85</beamChanceToAttachFire>
<beamFireSizeRange>0.55~0.85</beamFireSizeRange>
<beamLineFleckDef>Fleck_BeamSpark</beamLineFleckDef>
<beamStartOffset>0.8</beamStartOffset>
<beamLineFleckChanceCurve>
<points>
<li>(0, 0)</li>
<li>(0.65, 0.4)</li>
<li>(1, 0.75)</li>
</points>
</beamLineFleckChanceCurve>
</li>
</verbs>
You can also do it via an ability comp:
<AbilityDef>
<verbProperties>
<verbClass>AthenaFramework.Verb_ShootRunningBeam</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<warmupTime>1.0</warmupTime>
<range>24.9</range>
<stopBurstWithoutLos>false</stopBurstWithoutLos>
<beamDamageDef>Beam</beamDamageDef>
<beamGroundFleckDef>Fleck_BeamBurn</beamGroundFleckDef>
<beamFleckChancePerTick>0.32</beamFleckChancePerTick>
<beamMoteDef>Mote_GraserBeamBase</beamMoteDef>
<beamEndEffecterDef>GraserBeam_End</beamEndEffecterDef>
<beamChanceToStartFire>0.85</beamChanceToStartFire>
<beamChanceToAttachFire>0.85</beamChanceToAttachFire>
<beamFireSizeRange>0.55~0.85</beamFireSizeRange>
<beamLineFleckDef>Fleck_BeamSpark</beamLineFleckDef>
<beamStartOffset>0.8</beamStartOffset>
<beamLineFleckChanceCurve>
<points>
<li>(0, 0)</li>
<li>(0.65, 0.4)</li>
<li>(1, 0.75)</li>
</points>
</beamLineFleckChanceCurve>
</verbProperties>
<comps>
<li Class="AthenaFramework.CompProperties_AbilityShootRunningBeam">
<burstCount>20</burstCount>
<ticksBetweenShots>22</ticksBetweenShots>
</li>
</comps>
</AbilityDef>
Similarly to turret extensions, you could use offsets to position your beam start on the owner
<comps>
<li Class="AthenaFramework.CompProperties_AbilityShootRunningBeam">
<burstCount>20</burstCount>
<ticksBetweenShots>22</ticksBetweenShots>
<offsets>
<li>(5.0, 0, 0)</li>
</offsets>
</li>
</comps>
Or
<comps>
<li Class="AthenaFramework.CompProperties_AbilityShootRunningBeam">
<burstCount>20</burstCount>
<ticksBetweenShots>22</ticksBetweenShots>
<offsets>
<li>(5.0, 0, 0)</li>
<li>(0, 0, 5.0)</li>
<li>(-5.0, 0, 0)</li>
<li>(0, 0, -5.0)</li>
</offsets>
</li>
</comps>