I has alternating beams that hit a target, then arc to a new target, as you see above
My code is here:
Code: Select all
<ItemType UNID="&itLightning;"
name= "Electric Arc Cannon"
level= "1"
value= "1500"
mass= "1500"
frequency= "notRandom"
modifiers= "EnergyWeapon; MajorItem; Illegal"
description= "A weapon created by the Taikon Corporation, this weapon was outlawed because of its tendency to be used by pirates. It's bolts will continue to arc and kill enemies."
>
<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
<Weapon
fireRate= "1"
powerUse= "10"
type= "missile"
lifetime= "50-100"
damage= "ion:1d3; EMP5"
missileSpeed= "80-100"
hitPoints= "1"
maneuverability= "3-4"
directional= "true"
sound= "&snMissileLauncher;"
vaporTrailLength="6"
vaporTrailWidth="130"
vaporTrailWidthInc="1"
vaporTrailColor="0x10, 0x32, 0xff"
multiTarget= "true"
autoAcquireTarget= "true"
configuration = "alternating"
>
</Weapon>
<Events>
<OnDamageArmor>
(block nil
(switch
(leq (objGetDistance gSource (sysFindObject gSource "sN")) 14)
(block (target fireAngle)
(setq target (sysfindobject gSource "sN"))
(block (fireAngle)
(setq fireAngle (sysVectorAngle (sysVectorSubtract (objGetPos target) (objGetPos gSource))))
(sysCreateWeaponFire &vtLightningArc; gSource (objGetPos gSource) (sysVectorAngle (sysVectorSubtract (objGetPos target) (objGetPos (objGetPos gSource)))) 100 target)
)
)
(geq (objGetDistance gSource (sysFindObject gSource "sN")) 14)
(block nil
(sysCreateWeaponFire &vtLightningArc; gSource (objGetPos gSource) (random 0 359) 100 gSource)
)
)
(shpDamageArmor gplayership aHitPos aDamageType aDamageHP)
)
</OnDamageArmor>
</Events>
</ItemType>
<ItemType UNID="&vtLightningArc;"
name= "Electric Arc Cannon"
level= "1"
virtual="true"
>
<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
<Weapon
fireRate= "1"
powerUse= "10"
type= "missile"
lifetime= "22-26"
damage= "ion:1d3; EMP5"
missileSpeed= "80-100"
hitPoints= "1"
omnidirectionsl= "true"
maneuverability= "1-2"
sound= "&snMissileLauncher;"
vaporTrailLength="6"
vaporTrailWidth="130"
vaporTrailWidthInc="1"
vaporTrailColor="0x10, 0x32, 0xff"
multiTarget= "true"
autoAcquireTarget= "true"
configuration = "alternating"
>
</Weapon>
<Events>
<OnDamageArmor>
(block nil
(switch
(leq (objGetDistance gSource (sysFindObject gSource "sN")) 14)
(block (target fireAngle)
(setq target (sysfindobject gSource "sN"))
(block (fireAngle)
(setq fireAngle (sysVectorAngle (sysVectorSubtract (objGetPos target) (objGetPos gSource))))
(sysCreateWeaponFire &vtLightningArc; gSource (objGetPos gSource) fireAngle 100 target)
)
)
(geq (objGetDistance gSource (sysFindObject gSource "sN")) 14)
(block nil
(sysCreateWeaponFire &vtLightningArc; gSource (objGetPos gSource) (random 0 359) 100 gSource)
)
)
(shpDamageArmor gplayership aHitPos aDamageType aDamageHP)
)
</OnDamageArmor>
</Events>
</ItemType>
EDIT: I just did some more work, and got this while testing:

- ElectricRanx.png (23.97 KiB) Viewed 21568 times
The ranx (at about 80% damage at this point) exploded a few seconds later. Of course, you're not likely to get a couple dreadnoughts to sit there and let you blast them outside of debugging/godmod, but whatever, it's great fun.

Play in over
100 systems in a network. Play the
2011 Mod Of the Year
and the highest rated mod on Xelerus,
The Network.
Play the July Mod of the Month,
Fellow Pilgrims!
Play
My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?