import App
def Create(pTorp):
kCoreColor = App.TGColorA()
kCoreColor.SetRGBA(104.0 / 255.0, 200.0 / 255.0, 255.0 / 255.0, 1.000000)
kGlowColor = App.TGColorA()
kGlowColor.SetRGBA(255.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0, 1.000000)
pTorp.CreateTorpedoModel(
"data/Textures/Tactical/TorpedoCore.tga",
kCoreColor,
0.3,
1.2,
"data/Textures/Tactical/TorpedoGlow.tga",
kGlowColor,
1.0,
0.4,
0.4,
"data/Textures/Tactical/TorpedoFlares.tga",
kGlowColor,
8,
0.1,
0.1)
pTorp.SetDamage( GetDamage() )
pTorp.SetDamageRadiusFactor( GetDamageRadius() )
pTorp.SetGuidanceLifetime( GetGuidanceLifetime() )
pTorp.SetMaxAngularAccel( GetMaxAngularAccel() )
pTorp.SetLifetime( GetLifetime() )
# 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.QUANTUM3)
return(0)
def GetName():
return("Tricobalt")
def GetDamage():
return 7500.0
def GetDamageRadius():
return 0.5
def GetLaunchSound():
return("Quantum Torpedo 3")
def GetLaunchSpeed():
return 100.0
def GetMaxAngularAccel():
return 10.0
def GetGuidanceLifetime():
return 0.6
def GetPowerCost():
return 10.0
def GetLifetime():
return 10.0
Thats a complete torpedo script. The GetPowerCost parameter is only used by the AI to influence torpedo selection. The engine does not pass this value on, nor does it affect the spaceship's weapon power consumption.