Modding, Mission Design, and Coding > The Modding Workshop

Homing Primaries??

(1/2) > >>

starbug:
Is it possible to make Primary weapons like the Terran Turret for example to home like a missile?? I'm sure ive seen a video over on discord where theres a shivan cruiser firing their laser turrets and they are all homing on to their target.

Is it as simple as adding something like this to the weapon table?
$Homing:                     YES
   +Type:               ASPECT
   +Turn Time:            2.0
   +View Cone:            360.0
   +Min Lock Time:         3.0
   +Lock Pixels/Sec:      40
   +Catch-up Pixels/Sec:   80
   +Catch-up Penalty:      10
   +Seeker Strength: 10

0rph3u5:
From one of my testing builds:


--- Code: ---$Name: Smart Rifle
$Model File: none
@Laser Bitmap: LaserGlow03
@Laser Glow: 2_LaserGlow03
@Laser Color: 150, 150, 150
@Laser Color2: 150, 150, 150
@Laser Length: 2.0
@Laser Head Radius: 1.0
@Laser Tail Radius: 1.0
$Mass: 1
$Velocity: 400.0
$Fire Wait: 0.8
$Damage: 15 ;;TBD
;;Damage Type: Rifle-lvl0
$Detonation Range: 1600
$Blast Force: 0
$Inner Radius: 0
$Outer Radius: 0
$Shockwave Speed: 0.0
$Armor Factor: 1.0 ;;modified elsewhere
$Shield Factor: 1.0 ;;modified elsewhere
$Subsystem Factor: 1.0 ;;modified elsewhere
$Lifetime: 4.0
$Energy Consumed: 0.0 ;;uses ammo instead
$Cargo Size: 0.25 ;; TBD
$Homing: YES
+Type: HEAT
+Turn Time: 1.0
+View Cone: 40.0
+Seeker Strength: 3.0
+Target Lead Scaler: 0
$LaunchSnd: -1
$ImpactSnd: -1
$FlyBySnd: -1
$Rearm Rate: 0.3 ;;TBD
$Rearm Ammo Increment: 25
+Weapon Range: 1600
$Flags: ( "Player allowed" "Ballistic" "no pierce shields" "small only" "no primary linking" "no homing speed ramp" )
$Icon: iconcirce
$Anim: circe
$Impact Explosion: exp20
$Impact Explosion Radius: 0.0
--- End code ---

EDIT: This is a proof of concept for a homing primary - as such many values are "just there". It is meant to be used by the player and slot into a "specialist weapons slot", which is a primary weapon slot with only a single firing point on the model.

starbug:
Ah right so would that work on a Capital ship weapon for say a Energy type Torpedo for example?

0rph3u5:
Sure - it depends on the effect that you would want (e.g. the "no homing speed ramp"-flag in the example above is so that the it looks like a normal bullet has been fired, but if you leave it out it might be more like a gyro-jet effect)

Colonol Dekker:
Wings of dawn has many examples.

Navigation

[0] Message Index

[#] Next page

Go to full version