When off the weapon is stronger, when on the weapon is weaker, but omni !
I'm testing this (that doesn't work):
Someone has a better idea ?<!-- Omni - non omni laser -->
<ItemType UNID="&itOmniswitch;"
name= "Omniswitch Laser"
level= "4"
value= "5400"
mass= "5500"
frequency= "rare"
modifiers= "EnergyWeapon; MajorItem"
description= "The omnidirectional turret of this laser can be turned on and off, when off the laser is connected to an extra capacitor and deliver a stronger beam."
>
<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
<Weapon
type= "beam"
omnidirectional= "SOmni"
damage= "laser:2d4+2"
fireRate= "15"
lifetime= "30"
powerUse= "55"
beamType= "laser"
primaryColor= "0xf1, 0x5f, 0x2a"
secondaryColor= "0xff, 0x00, 0x00"
sound= "&snLaserCannon;"
maxCharges= "1"
>
</Weapon>
<Invoke installedOnly="true">
(block (charges maxCharges SOmni)
(setq charges (shpGetItemCharges gSource gItem))
(setq maxCharges 1)
(switch
(eq charges maxCharges)
(block Nil
(setq "SOmni" "True")
(setq charges 0)
(objSendMessage gSource Nil (cat "Omnidirectional turret on!" ))
(shpEnhanceItem gPlayerShip &itOmniswitch; 0x0605)
)
(block Nil
(setq "SOmni" "False")
(setq charges 1)
(objSendMessage gSource Nil (cat "Omnidirectional turret Off!" ))
(shpEnhanceItem gPlayerShip &itOmniswitch; 0x8605)
)
)
)
</Invoke>
</ItemType>