Modding, Mission Design, and Coding > The FRED Workshop

Capital Ship Mission - Need Help EMPing Myself!

(1/3) > >>

Erebus Alpha:
So, I'm building a mission where the player flies a capital ship. Using keypress-triggered SEXP's, the player can overtax the ship's powergrid in various ways to improve performance. All of that actually works great and is awesome!

One of the bad things that can happen is a system malfunction, which I want to use EMP to simulate. So made this weapon:


--- Code: ---$Name: MG-EMP
$Model File: none
$Velocity: 20
$Fire Wait: 1
$Damage: 1
$Damage Type: HugeWeapon
$Blast Force: 2000.0
$Inner Radius: 10.0
$Outer Radius: 20.0
$Armor Factor: 1
$Shield Factor: 1
$Subsystem Factor: 0
$Lifetime: 0.1
$Energy Consumed: 0.0
$Cargo Size: 1
$Homing: NO
$Rearm Rate: 0.05
$Flags: ( "EMP" )
$EMP Intensity: 375.0
$EMP Time:                             3.0

--- End code ---

...and then set up this SEXP to trigger its creation...


--- Code: ---$Formula: ( every-time
   ( and
      ( >=
         ( mission-time-msecs )
         ( + @Last-Overload-Effect[0] 3000 )
      )
      ( >= @Overload-State[0] 50 )
      ( < @Overload-State[0] 75 )
   )
   ( weapon-create
      "<none>"
      "MG-EMP"
      ( get-object-x "Alpha 1" )
      ( get-object-y "Alpha 1" )
      ( get-object-z "Alpha 1" )
   )
   ( modify-variable
      @Last-Overload-Effect[0]
      ( mission-time-msecs )
   )
)
+Name: OverloadEMP
+Repeat Count: 1
+Interval: 1
--- End code ---

The view visibly shakes, and I get the 'BLAST' warning on the UI every 3 seconds, so I am pretty sure the weapon is being properly generated, lasting for 0.1 seconds, exploding inside my ship, and hitting me. The issue is, it is not causing any kind of EMP effect.

JSRNerdo:
Try either replacing the EMP with an electronics (d-missile) effect or adding a shockwave to the EMP weapon. IIRC EMP and electronics weapons have some odd behaviour with blasts and shockwaves.

Erebus Alpha:
I would like to go with an EMP effect instead of an electronics effect. I added primary and secondary firepoints to the capship, and it does have some fantastically powerful missiles, all of which require aspect lock to fire. When EMP'ed, those missiles will not be usable.

Adding a shockwave back to the EMP weapon...

Nightmare:
Then make 2 weapons- 1 for the EMP to killed the target lock of the missiles, 1 to disable the player ship.

JSRNerdo:

--- Quote from: Erebus Alpha on May 16, 2018, 03:48:42 pm ---I would like to go with an EMP effect instead of an electronics effect. I added primary and secondary firepoints to the capship, and it does have some fantastically powerful missiles, all of which require aspect lock to fire. When EMP'ed, those missiles will not be usable.
--- End quote ---

An electronics effect with weapons/sensors/etc multipliers set to a non-zero number does in fact shut down your weapons and prevent you from firing them, basically giving the same effect as an EMP. Source: Made a capship command mission with a special ability ehitting you with electronics as part of a backblast thing

Navigation

[0] Message Index

[#] Next page

Go to full version