Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Scotty on February 28, 2009, 10:54:27 pm

Title: Damage over time
Post by: Scotty on February 28, 2009, 10:54:27 pm
Is it possible to set a ship to receive damage at a constant rate?  For this campaign idea I have, a ship is flying in a very new/very hot nebula, and the shields are protecting it from damage.  Is there a way to have a ship steadily take damage once its shields go down?

I have the start of it, but I don't know what SEXP I can use for it

when
----shield-quad-low
     ----<ship>
     ----0
----?  (basically, how do I make it take damage)
Title: Re: Damage over time
Post by: FUBAR-BDHR on February 28, 2009, 11:08:08 pm
set-ship-subsystem-strength
--hull
--hull -1


To lazy to type the whole thing right now but basically that in a repeating event. 
Title: Re: Damage over time
Post by: Molybdenum on March 01, 2009, 02:56:42 am
Consider also adding a looping sound effect(scorching sound) at the players x, y, z every time the player takes the damage to make the effect even more awesome and not disorienting.  :cool:
Title: Re: Damage over time
Post by: TopAce on March 01, 2009, 05:26:37 am
set-ship-subsystem-strength
--hull
--hull -1

To lazy to type the whole thing right now but basically that in a repeating event. 

Would that also work for shields? I never tried to do anything like that, but I doubt so.
Title: Re: Damage over time
Post by: Mobius on March 01, 2009, 05:46:49 am
set-ship-subsystem-strength
--hull
--hull -1


To lazy to type the whole thing right now but basically that in a repeating event. 

Why? Isn't sabotage-subsystem so logical to use?
Title: Re: Damage over time
Post by: karajorma on March 01, 2009, 07:52:31 am
Sabotage-subsystem would probably be the better choice in this situation as it removes the need to get the current subsystem strength.
Title: Re: Damage over time
Post by: Scotty on March 01, 2009, 02:50:40 pm
If the shields come back up, will the damage stop?  That could be a major problem if your shields go down, but when they go back up, you still take damage.  As for the sound, I don't really know how to make that work (major noob here), so I just have your wingman yell at you to watch out for it.
Title: Re: Damage over time
Post by: karajorma on March 01, 2009, 03:58:32 pm
If you're using shield-quad-low it should go back up as soon as it isn't. :)
Title: Re: Damage over time
Post by: Scotty on March 01, 2009, 09:04:28 pm
Thanks.  On a related note, is the 'range' box in the background editor under nebula the sensor range?  I didn't want to have shivans jumping into such an isolated space (how would they know), so they come in under power or sit there stealthed until x-event has happened.  Also, is ship-invisible the same as ship-stealthy? 
Title: Re: Damage over time
Post by: karajorma on March 02, 2009, 05:20:06 pm
Yep, that's what it does IIRC. It's been a while since I last used the range option.

As for ship-invisible that makes the ship appear as the flickering dot on radar and makes it impossible to target. It only affects the player. Ship-stealthy on the other hand also makes it impossible to target the ship and makes it not appear on radar at all. It affects ships other than the player too.