Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Kusanagi on September 14, 2010, 02:21:07 pm

Title: Feature Request: Damage Lightning
Post by: Kusanagi on September 14, 2010, 02:21:07 pm
I was wondering if it would be possible to implement a SEXP that makes a ship show its damage lightning no matter what its health is.  :)
Title: Re: Feature Request: Damage Lightning
Post by: Kolgena on September 14, 2010, 07:16:40 pm
Maybe... I mean, the EMP triggers damage lightning (or at least being in the Red EMP nebula does)
Title: Re: Feature Request: Damage Lightning
Post by: FUBAR-BDHR on September 14, 2010, 07:54:00 pm
Sounds like adding $Damage Lightning Type: Always and a sexp to allow changing the type would be the way to go here.  

Were you wanting this for individual ships or the entire ship class? 
Title: Re: Feature Request: Damage Lightning
Post by: Kusanagi on September 14, 2010, 10:49:08 pm
It sounds like it could work for ship classes, especially if you have one ship as a template.

The reason I was asking is because it would be an incredible effect to add to Beast ships. In Homeworld, those ships always had lightning playing around their hulls.

Which do you think would work better in that scenario since they would just be retextured versions of normal ships?
Title: Re: Feature Request: Damage Lightning
Post by: FUBAR-BDHR on September 14, 2010, 11:21:25 pm
Well in that case it might be better to just create a mesh around the main hull with no collision and a lightning effect as the texture. 
Title: Re: Feature Request: Damage Lightning
Post by: Solatar on September 15, 2010, 10:58:22 am
You'd certainly have a lot more control over what the lightning effect looked like if you did it that way. 
Title: Re: Feature Request: Damage Lightning
Post by: Dark RevenantX on September 15, 2010, 12:19:37 pm
This would still be an useful SEXP for other uses as well.  I could name a number of situations where this would be useful, such as making the impact of a particularly powerful beam seem that much more powerful (the beam won't necessarily knock the hull to 10%, but if it takes off half of the hit points, the ship's going to be in a hell of a shock) by having the ship spark up for a bit and maybe lose the glowmaps/points for a few seconds.  Having some sort of control over the lightning's intensity would be nice as well, but that's entirely optional.

On an unrelated note, is it possible to make it so that the thruster glows don't show if the ship's speed is 0?
Title: Re: Feature Request: Damage Lightning
Post by: Kusanagi on September 15, 2010, 07:42:26 pm
Having the glowmaps flicker from a weapon impact? Oooo, I like that idea.
Title: Re: Feature Request: Damage Lightning
Post by: Bob-san on September 15, 2010, 08:04:10 pm
Well in that case it might be better to just create a mesh around the main hull with no collision and a lightning effect as the texture. 
Wouldn't that be quite memory-intensive?
Title: Re: Feature Request: Damage Lightning
Post by: FUBAR-BDHR on September 15, 2010, 09:11:37 pm
No more memory intensive then any other animated hull texture. 
Title: Re: Feature Request: Damage Lightning
Post by: Delta_V on September 15, 2010, 09:36:23 pm
Quote
the ship spark up for a bit and maybe lose the glowmaps/points for a few seconds

This could be very cool, and would add to the perceived power of weapons like beam cannons, similar to the beam-pierce effect.  In fact, it might be cool to have the beam pierce happen anytime a beam does more than a certain percent damage to the target, and also have the glowmaps flicker and the damage lightning occur for a few seconds.
Title: Re: Feature Request: Damage Lightning
Post by: mjn.mixael on September 15, 2010, 11:00:28 pm
Quote
the ship spark up for a bit and maybe lose the glowmaps/points for a few seconds

This could be very cool, and would add to the perceived power of weapons like beam cannons, similar to the beam-pierce effect.  In fact, it might be cool to have the beam pierce happen anytime a beam does more than a certain percent damage to the target, and also have the glowmaps flicker and the damage lightning occur for a few seconds.

yes it would be cool, but that needs to be up to each MOD.
Title: Re: Feature Request: Damage Lightning
Post by: General Battuta on September 15, 2010, 11:26:11 pm
Well in that case it might be better to just create a mesh around the main hull with no collision and a lightning effect as the texture. 
Wouldn't that be quite memory-intensive?

I'd be more worried about BMPMAN than memory.
Title: Re: Feature Request: Damage Lightning
Post by: swashmebuckle on September 16, 2010, 01:11:55 am
On an unrelated note, is it possible to make it so that the thruster glows don't show if the ship's speed is 0?
This would be awesome, though it'd be even better if you could specify an alternate image for when the speed is set to zero.  That way you could either make it have no glow at all or have a smaller "stand by" type of glow.  It'd also be great for FotG if were possible to disable the constant jittery flicker that all engine glows do.
Title: Re: Feature Request: Damage Lightning
Post by: chief1983 on September 16, 2010, 08:07:47 am
I'm not sure the flicker is the worst of our thruster problems.
Title: Re: Feature Request: Damage Lightning
Post by: mjn.mixael on September 16, 2010, 04:04:12 pm
I'm not sure the flicker is the worst of our thruster problems.

It's not.. but this thread is about Damage Lightning.. not thrusters... /getbackontopic   :doubt:
Title: Re: Feature Request: Damage Lightning
Post by: Kusanagi on September 17, 2010, 03:38:37 pm
How about an option in a table entry for damage lightning that works like this:

$Damage Lightning Threshold:

Make it an integer from 0-100 that relates to the percentage of the target's health the lighting will begin to show at. Values of 100 will have the lightning always on no matter what the health of the ship, 0 means its never on no matter what the health, and have it default to 10 which is the "normal" threshold.