Bridge Commander Central
BC Forums => BC Scripting => Topic started by: TParis on June 17, 2007, 03:56:22 PM
-
First of all: Using latest FTECH build (20051126).
I added the code for the damper weapon to my breen torpedo projectile... but when i fire the weapon with my Breenship, the game crashes :( Plz help!
-
I hope to put out a new FoundationTechnologies version soon.
Hopefully this is corrected then. Though I never recalled having this problem myself.
-
that kind of failure sometimes happens when you put a different torpedo file in your HP.
be sure the type of torpedo in the Breen ship is BreenDrain and not BreenDrainer, for example.
you need to have the same name in the ship and in the projectile folder, whichever it is.
-
Your right.
I think this classifies as a "whoops" moment.
BC crashes (ATM, I'm looking at improving this ;) ) when it can't find a torpedo script (as in, tries to use it anyway). It's the most likely cause of BC crashes during battle.
-
Ye it's BreenDrain in the Hardpoint aswell. Just noticed that the Torpedo doesnt show up ingame X_X .
Tried another torpedo type and that one is working perfectly.
-
How did you add it to the hardpoint?
And what is the exact path to the torpedo script?
-
1. How i added (from foundation tech readme ^.^ ):
You can add the Breen Damper to your projectile by adding the following code to the bottom of your projectile script:
sYieldName = ?Damper Weapon?
sFireName = None
try:
import FoundationTech
try:
oFire = FoundationTech.oTechs[sFireName]
FoundationTech.dOnFires[__name__] = oFire
except:
pass
try:
oYield = FoundationTech.oTechs[sYieldName]
FoundationTech.dYields[__name__] = oYield
except:
pass
except:
pass
2. Where the script is:
Bridge Commander\scripts\Tactical\Projectiles\BreenDrain.py
Humm ye when i remove the code, the Torpedo is workin again. SRy if i did sth stupid but im just getting into modding :) .
-
that exception handler should cause no problem with the script. if it failed, it should just skip it over.
might be another thing.
-
Uhhhhh... exeption handler? ^^
-
The try: except:
-
another "whoops" common error:
are you sure the torpedo is a .py file?
kinda obvious, but I just recalled an error I suffered once lol.