Here try this one its the same one i use, and it does all that you requested, just paste it over one of your own Borg torps. I did not make it and ive forgoten who did, but props to them, cheers.
###############################################################################
# Filename: STFCBorgTorp.py
#
# Confidential and Proprietary, Copyright 2000 by Totally Games
#
# Script for filling in the attributes of DGPulsarTorp torpedoes.
#
# Created: 7/21/05 - Sonc14
###############################################################################
import App
###############################################################################
# Create(pTorp)
#
# Creates a STFCBorgTorp torpedo.
#
# Args: pTorp - the torpedo, ready to be filled-in
#
# Return: zero
###############################################################################
def Create(pTorp):
kCoreColor = App.TGColorA()
kCoreColor.SetRGBA(255.0 / 255.0, 300.0 / 255.0, 255.0 / 255.0, 1.000000)
kGlowColor = App.TGColorA()
kGlowColor.SetRGBA(149.0 / 255.0, 192.0 / 255.0, 76.0 / 255.0, 1.000000)
kFlareColor = App.TGColorA()
kFlareColor.SetRGBA(149.0 / 255.0, 192.0 / 255.0, 76.0 / 255.0, 1.000000)
pTorp.CreateTorpedoModel(
"data/Textures/Tactical/TorpedoCore.tga",
kCoreColor,
0.100,
1.0,
"data/Textures/Tactical/TorpedoGlow.tga",
kGlowColor,
1.0,
0.5,
0.6,
"data/Textures/Tactical/TorpedoFlares.tga",
kFlareColor,
60,
0.4,
0.10)
pTorp.SetDamage( GetDamage() )
pTorp.SetDamageRadiusFactor(0.10)
pTorp.SetGuidanceLifetime( GetGuidanceLifetime() )
pTorp.SetMaxAngularAccel( GetMaxAngularAccel() )
# Multiplayer specific stuff. Please, if you create a new torp
# type. modify the SpeciesToTorp.py file to add the new type.
import Multiplayer.SpeciesToTorp
pTorp.SetNetType (Multiplayer.SpeciesToTorp.PHOTON)
return(0)
def GetLaunchSpeed():
return(45.0)
def GetLaunchSound():
return("Quantum Torpedo")
def GetPowerCost():
return(5.0)
def GetName():
return("Sheild Drainer")
def GetDamage():
return 100.0
def GetGuidanceLifetime():
return 14.0
def GetMaxAngularAccel():
return 0.15
# Sets the minimum damage the torpedo will do
def GetMinDamage():
return 20
# Sets the percentage of damage the torpedo will do
def GetPercentage():
return 0.12
def TargetHit(pObject, pEvent):
pTarget=App.ShipClass_Cast(pEvent.GetDestination())
MinYield=GetMinDamage()
Percentage=GetPercentage()
pShields = pTarget.GetShields()
for ShieldDir in range(App.ShieldClass.NUM_SHIELDS):
pShieldStatus=pShields.GetCurShields(ShieldDir)
pShieldChunk=pShields.GetMaxShields(ShieldDir)*Percentage
if (MinYield>pShieldChunk):
pShieldChunk=MinYield
if (pShieldStatus<=pShieldChunk):
pShieldStatus=0
pShields.SetCurShields(ShieldDir,pShieldStatus-pShieldChunk)
return
def WeaponFired(pObject, pEvent):
return