I'm having trouble getting my turrets to work. I've never dealt with them before, so I'm stuck.
I've got the turret all modeled, positioned on the ship correctly, etc. The turret rotates to face it's target and all. But here I encounter problems.
If I set it's "Graphic Type" to 2, the sprite, whenever I fire the turret it creates the correct bitmap, racing at the target. But, the bitmap is oriented towards the camera, and not the target, which looks horrible. And, for some reason there's no muzzle flash. And there's only one bitmap it creates, but in the ship DEF, I told it to use 2 muzzles...do I need to add the # of muzzles somewhere else for it to fire both? Or do turrets only support one muzzle?
However, if I set the graphic_type to 3, the turret wont fire. Here's the DEF, any help is appreciated:
Code: Select all
WEAPON
primary: {
name: HETurret,
group: Turrets,
target_type: 0x0000ffff,
value: 1,
capacity: 100,
recharge_rate: 10,
refire_delay: 0.2,
charge: 5,
min_charge: 5,
damage: 5,
speed: 10e3,
life: 5,
guided: 0,
self_aiming: true,
aim_az_max: 360,
aim_el_max: 0.5,
min_range: 10e3,
max_range: 40e3,
turret: "HTurret.mag"
scale: 1,
graphic_type: 3,
bitmap: "HEBolt.pcx",
light: 10,
flash: "HEMuzzle.pcx",
flash: 0.25,
}
And the DEF for the ship:
Code: Select all
SHIP
name: Thunder
display_name: Thunder
class: Frigate
abrv: "Thunder"
model: "HRThunder.MAG"
mass: 190.0
integrity: 3e3
vlimit: 375
agility: 23
air_factor: 0.25
roll_rate: 2000
scale: 2.00
acs: 1.1
detet: 50e3
trans_x: 2000
trans_y: 1500
trans_z: 2000
drag: 0.0035
roll_drag: 10
pitch_drag: 7.5
yaw_drag: 7.5
CL: 1e-2
CD: 1.5e-5
stall: 0.40
prep_time: 15
avoid_fighter: 7
chase: (0, -130, 50)
bridge: (0, 6, 10)
power: {
type: Fusion,
max_output: 120,
fuel_range: 0.5,
loc: (0, 0, -159),
size: 32,
hull_factor: 0.75
}
drive: {
type: Red,
thrust: 15,
augmenter: 50,
scale: 1,
port: (-8, 10, -175),
port: (9, 10, -175),
port: (0, -6, -175),
port: (-8, -28, -175),
port: (9, -28, -175),
port: (0, -41, -175),
loc: (0, 0, 0),
size: 16,
hull_factor: 0.85
}
weapon: {
type: "LGauss",
design: "LGauss",
name: "Light Gauss",
abrv: "Gauss-1",
loc: ( -32, -14, 100),
muzzle: ( -32, -14, 153),
size: 8,
hull_factor: 0.08,
explosion: 7
}
weapon: {
type: "LGauss",
design: "LGauss",
name: "Light Gauss",
abrv: "Gauss-1",
loc: ( -22, -14, 100),
muzzle: ( -22, -14, 153),
size: 8,
hull_factor: 0.08,
explosion: 7
}
weapon: {
type: "LGauss",
design: "LGauss",
name: "Light Gauss",
abrv: "Gauss-1",
loc: ( 21, -14, 100),
muzzle: ( 21, -14, 153),
size: 8,
hull_factor: 0.08,
explosion: 7
}
weapon: {
type: "LGauss",
design: "LGauss",
name: "Light Gauss",
abrv: "Gauss-1",
loc: ( 31, -14, 100),
muzzle: ( 31, -14, 153),
size: 8,
hull_factor: 0.08,
explosion: 7
}
weapon: {
type: "HETurret",
design: "HETurret",
name: "Energy Turret",
abrv: "Turret-1",
loc: ( 44, 41, -117),
muzzle: ( -3, 9, 14),
muzzle: ( 4, 9, 14),
size: 8,
hull_factor: 0.08,
explosion: 7
}
decoy: {
type: "Fighter Decoy",
abrv: "Decoy",
muzzle: ( 0, -32, 0),
loc: (0, 0, 0),
size: 16,
hull_factor: 0.5
}
sensor: {
pcs: 25,
active_efficiency: 2e9,
passive_efficiency: 500,
range: 25e3,
range: 50e3,
range: 75e3,
loc: (0, 0, 100),
size: 25,
hull_factor: 0.25
}
computer: {
name: "Avionics Package",
abrv: "HUD",
type: 1,
loc: (20, 0, 80),
size: 8,
hull_factor: 0.2
}
computer: {
name: "Flight Computer",
abrv: "Flight",
type: 2,
loc: (-20, 0, 80),
size: 16,
hull_factor: 0.5
}
nav: {
loc: (0, 0, 60),
size: 16,
hull_factor: 0.1
}
death_spiral: {
time: 0.1,
explosion_type: 10, // SMALL_EXPLOSION
explosion_time: 1.1,
explosion_loc: (0, 0, -64),
explosion_type: 10, // SMALL_EXPLOSION
explosion_time: 1.5,
explosion_loc: (20, 10, -20),
final_type: 11, // LARGE_EXPLOSION
final_loc: (0, 0, -32),
final_type: 12, // LARGE_BURST
final_loc: (0, 0, -32),
}
map: {
sprite: "map0.pcx",
sprite: "map1.pcx",
sprite: "map2.pcx",
sprite: "map3.pcx",
sprite: "map4.pcx",
sprite: "map5.pcx",
sprite: "map6.pcx",
sprite: "map7.pcx"
}