Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Droid803 on June 19, 2009, 09:57:20 pm

Title: Beams out of multiparts (problem)
Post by: Droid803 on June 19, 2009, 09:57:20 pm
I'm trying to get beams to shoot out of a dual-barrelled multipart turret properly.
So far, I've managed to get it to fire straight out of the barrel (sorta - it's aligned, but read on...), but there's a delay between the two beams firing even with "use multiple guns" set. "use multiple guns" works when I have normal primaries on it, but not with beams.

Also well... look at the screenshot. (lvlshotted)

(http://img.photobucket.com/albums/v423/kc1991/BeamTurretFail.jpg)

The beams aren't lined up with the barrels.

I've checked the normals on the turret, and they are right inside the barrel (I even made them pointing straight up). Furthermore, there isn't this issue when I have it fire a normal weapon with a long trail. Scratch that - it still is, just not as noticable.

Is there a way to fix either of these issues?

I can live with the beams not both firing at the same time, but having them hand outside of the turret just looks stupid.
Title: Re: Beams out of multiparts (problem)
Post by: FUBAR-BDHR on June 20, 2009, 12:40:40 am
I just got this working in TBP. 

Subsystem entry from ships.tbl
Code: [Select]
$Subsystem:                   turret08a,      1.2, 2.4
    $Default PBanks:     ( "EA Nova-X main beam" "EA Nova-X main beam" )
    $Flags: ( "carry no damage" "use multiple guns" )
    $animation: triggered
    $type: initial
    +relative_angle: 90,0,0

Weapon table entry

Code: [Select]
$Name:                        EA Nova-x main beam
$Model File:                  none
@Laser Bitmap:                none
@Laser Color:                 200, 60, 60
@Laser Length:                0.0
@Laser Head Radius:           0.0
@Laser Tail Radius:           0.0
$Mass:                        100.0
$Velocity:                    2000.0
$Fire Wait:                   2.5
$Damage:                      350
$Armor Factor:                1.0
$Shield Factor:               1.0
$Subsystem Factor:            1.0
$Lifetime:                    3.0
$Energy Consumed:             0.0
$Cargo Size:                  0.0
$Homing:                      NO
$LaunchSnd:                   124
$ImpactSnd:                   88
+Weapon Range:                5500
$Flags:                       ("Big Ship" "cycle" "huge" "beam" "same turret cooldown")
$Icon:                        icongun05
$Anim:                        LoadGun02
$Impact Explosion:              ExpMissileHit1
$Impact Explosion Radius:       70.0
$BeamInfo:
      +Type:                        4
      +Life:                        0.30
      +Warmup:                      75
      +Warmdown:                    50
      +Radius:                      12
      +PCount:                      0
      +PRadius:                     0.0
      +PAngle:                      0.0
      +PAni:                        particleexp01
      +Miss Factor:                 0.8 1.0 1.3 1.5 1.8
      +BeamSound:                   144
      +WarmupSound:                 122
      +WarmdownSound:               123
      +Muzzleglow:                  ea_bg3
      +Shots:                       2
      +ShrinkFactor:                0.25
      +ShrinkPct:                   1.05
      $Section:
            +Width:                   12.0
            +Texture:                 dk_b2
            +RGBA Inner:              170 250 0 255
            +RGBA Outer:              20 60 0 255
            +Flicker:                 0.0
            +Zadd:                    2.0
      $Section:
            +Width:                   8.5
            +Texture:                 ea_b1
            +RGBA Inner:              170 250 0 255
            +RGBA Outer:              20 60 0 255
            +Flicker:                 0.0
            +Zadd:                    1.0
      $Section:
            +Width:                   6.0
            +Texture:                 dk_b2
            +RGBA Inner:              250 250 250 255
            +RGBA Outer:              20 20 20 255
            +Flicker:                 0.1
            +Zadd:                    0.0
$shots:       2

Fires both barrels at the same time.
Title: Re: Beams out of multiparts (problem)
Post by: Wanderer on June 20, 2009, 01:32:56 am
If you are using 3.6.11 builds (ie. not RC builds)... then you could try salvo mode subsystem flag

http://www.hard-light.net/wiki/index.php/Subsystems#.24Flags:
Title: Re: Beams out of multiparts (problem)
Post by: Droid803 on June 20, 2009, 01:35:43 am
I just got this working in TBP. 

Subsystem entry from ships.tbl
<snip>

Weapon table entry

<snip>

Fires both barrels at the same time.

Just tested those flags - worked like a charm. Thanks!

Now just to solve the barrel issue! I have a hunch though...
Title: Re: Beams out of multiparts (problem)
Post by: Trivial Psychic on June 20, 2009, 01:37:32 am
Which pof viewing program have you used to view the position of the turret normals?  It occurred to me that perhaps one of the programs was miss-aligning the firepoints as compared to what the program was showing you.
Title: Re: Beams out of multiparts (problem)
Post by: Droid803 on June 20, 2009, 01:41:13 am
I'm using PCS2.
Modelview won't open the TigerClaw model (poly count thing).

Would the barrels not being attached to the base with an offset of 0:0:0 cause the firepoints to rotate differently from the barrels? Because I noticed the cannons weren't coming directly from the center of the turret like on some other models.
Title: Re: Beams out of multiparts (problem)
Post by: Trivial Psychic on June 20, 2009, 01:49:08 am
Not sure.  Perhaps a little trial-and-error.  Adjust the firepoints in PCS2 offset in the opposite direction from how they're appearing and test repeatedly until they match up.  Are they aligning up properly for non-beam weapons?
Title: Re: Beams out of multiparts (problem)
Post by: Droid803 on June 20, 2009, 12:33:42 pm
I think that they're aligning properly for non-beam weapons, but that might just be the muzzleflash obscuring the offset.

It's still offset for non-beam weapons. So I guess it IS the alignment...I'll fiddle with it.
Title: Re: Beams out of multiparts (problem)
Post by: Spoon on June 20, 2009, 01:12:04 pm
I usually get this problem when I don't set my turret barrels pointing 90 degree straight up or down in max (or whatever 3d program you use)
Title: Re: Beams out of multiparts (problem)
Post by: Commander Zane on June 20, 2009, 03:13:01 pm
What mod would this be, looks good.