Hi all, I have made a phaser special weapon, and when I click on the special weapon button and then click the target ship, the phaser fires. Problem is, I then have to do the same again to fire it again. What line do I add to the ODF to make it so when I have clicked the special button, and clicked on the target ship, the phaser will keep firing till the special energy runs out or the target is destroyed??
At a guess, I'd try this line:
toggle = 1
the point defence laser uses it, I think it means that the weapon is switched on and off rather than fired once, but that is just a guess.
nope, didnt work im afraid. Here is what I have: Main file: //Name of the ODF file for the ordinance for this weapon ordName = "asbeamo" //Programming Stuff DO NOT CHANGE classLabel = "cannon" //Display name for this weapon wpnName = "Asgard beam weapon" tooltip = "Asgard beam weapon" verboseTooltip = "Asgard beam weapon" //Location of the button in the speed panel buttonSlot = 3 // Priority of button in the speed panel, this is only // used if it is non-zero. buttonPriority = 5 //Type of border to use for this button. //0 = No border. //1 = Offensive border. //2 = Defensive border. buttonBorder = 1 // Special special = 1 //Time Delay between shots shotDelay = 2.6f // Range within which the weapon will fire. range = 210.0f //Sound which is played when the weapon fires fireSound = "IonCannon.wav" // Chance to hit. hitChance = 0.95f // Do we need a target? needTarget = 1 // set target restrictions targetAlliedCraft = 1 targetAlliedBuildings = 1 targetEnemyCraft = 1 targetEnemyBuildings = 1 //Size of the flare around the phaser flareRadiusMultiplier = 0.3
Ord file: //Programming Stuff DO NOT CHANGE classLabel = "phaser" //The number of units which are subtracted from the Special Energy Reserve specialEnergyCost = 150 //The base amount of damage which the ordinance does with each hit damageBase = 550 //The amount of variance applied to the damage (i.e. 10 + or - 2) damageVariance = 1 //The threshold which must be exceeded to cause crew casualties prior //to shield exhaustion damageThreshold = 550 //The multiplier by which any damage which exceeds the threshold is //multiplied by to calculate the percentage of crew lost with that hit shieldCrewModifier = 0.2 //The multiplier by which any damage which is applied to the hull is //multiplied by to calculate the percentage of crew lost with that hit hullCrewModifier = 0.1 //Amount of time the ordinance will exists without hitting something lifeSpan = 1.0 //How fast the shot moves shotSpeed = 20 //The sprite which is used for this ordinance Sprite = "blphaser" // Time to play through the animation for the sprite in seconds spriteDuration = 1.0 //this modifies the color of the ordinance (not currently working) shotColor = 227 //Phaser specific: this is the thickness of the beam Radius = 4.5 // percentage of crew taken. percentage = .01
Add this to the main file. It should work, as far as I know.
[COLOR=black]wpnCategory = [COLOR=black]TOWE[/COLOR][/COLOR]
nope, no joy. Could using different class labels be the answer?
I suppose that could work... I think that the classlabel "cannon" might conflict with "phaser" but really i've no idea.
There has to be a class lable in each file. I know that the ones posted there work for a 'one shot' weapon. So what other beam type specials are out there that will run till the power runs out?
classLabel = "PointDefenseLaser" That's the only beam type class label I know of. It goes in the main file. I know you need the wpnCategory = [COLOR=black]TOWE[/COLOR]
[COLOR=black]So the computer registers it as a toggle weapon[/COLOR]
It works with the toggle switch, however the weapon doesnt fire now. I think with those class lables it will only target incoming torps. and not ships.
in the options at the Instant Action screen...are special weapons set to manual or auto? if they are set to auto and you are having this problem...try this code as i have this for my multitarget phasers and they fire automatically everytime an enemy ship comes into range. Type X phaser***************** #include "phaser.odf" //Type X Phaser Array //Display name for this weapon wpnName = "Type X Phaser Spread" tooltip = "Starship mounted Phaser Array: Type X" verboseTooltip = "Starships equipped with the type ten phaser array can target up to four enemy vessels simaltaneously." //Name of the ODF file for the ordinance for this weapon ordName = "fbphasox" //Location of the button in the speed panel buttonSlot = 1 // location of the button in the popup palette popupSlot = 1 // Priority of button in the speed panel, this is only // used if it is non-zero. buttonPriority = 1 //Type of border to use for this button. //0 = No border. //1 = Offensive border. //2 = Defensive border. buttonBorder = 1 // Mark this as a special weapon. special = 1 //Maxiumum number of targets maxTargets = 4 //Time Delay between shots shotDelay = 15.4 //Sound which is played when the weapon fires fireSound = "fxphaser.wav" switchToAttack = 1 //Programming Stuff DO NOT CHANGE classLabel = "areacannon" //Should not be used wpnReticle = "gblast" //UNKNOWN wpnPriority = 0 //UNKNOWN wpnCategory = "ARCA" // HIT_EVERYONE = 0, // HIT_ALLIES = 1, // HIT_ENEMIES = 2 hitCondition = 2 range = 496.0f specialEnergyCost = 16 lifeSpan = 1.25 shotSpeed = 1e6 shotColor = 227 Radius = 4.0 shieldDuration = 1.28 spriteDuration = 1.25 hitChance = 0.80 Ordinance file********************* #include "phasero.odf" //The base amount of damage which the ordinance does with each hit damageBase = 199 //The sprite which is used for this ordinance Sprite = "fphaserX" Radius = 5.0 shotSpeed = 1e6 shotColor = 227 flareRadiusMultiplier = 0.3 flaresprite = "worangeflare"