Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: psyhotik on December 06, 2008, 05:40:25 am

Title: Beam-protect destroyed ship
Post by: psyhotik on December 06, 2008, 05:40:25 am
Hi! I have a question:

Is it possible to prevent ships from firing their beams on already destroyed enemy vessel (enemy has 0% hull but hasn't exploded yet)? I was trying to do it by beam-protect SEXP (if is-destroyed-delay then beam-protect) but it seems to have no effect (maybe beam-protect doesn't work on destroyed ships?). I don't want to do it by locking beams of friendly ships, because there may be other targets for them. Any suggestions? :)
Title: Re: Beam-protect destroyed ship
Post by: Vertigo 7 on December 06, 2008, 06:56:08 am
you could try an ignore order instead of beam protect *edit just make sure you give it higher priority than any attack orders
Title: Re: Beam-protect destroyed ship
Post by: Rodo on December 06, 2008, 06:59:44 am
but if you get 0% hull then it's not the same ship... or is it? are you replacing it ?

maybe the (if-destroyed-delay then beam-protect) is not triggering because you never get a true on the destroyed-delay.
change that one to something else.
Title: Re: Beam-protect destroyed ship
Post by: Vertigo 7 on December 06, 2008, 07:03:55 am
i think there may be a is-hull-at sexp... im not sure off the top of my head. maybe that would work better (if it exists)
Title: Re: Beam-protect destroyed ship
Post by: FUBAR-BDHR on December 06, 2008, 11:55:50 am
If the ship is a 0 hull it has been destroyed.  None of those sexps will do anything because they will check the logs and see that the ship is destroyed and not change anything. 
Title: Re: Beam-protect destroyed ship
Post by: TrashMan on December 06, 2008, 11:56:31 am
When
<
-hits left
--ship
-1
ai-goals
-ai-ignore
--ship
Title: Re: Beam-protect destroyed ship
Post by: Galemp on December 06, 2008, 03:22:54 pm
Not AI Ignore... then it might actually sit there at 1% hull and never be killed unless the player does something. Try beam-protect-ship instead.
Title: Re: Beam-protect destroyed ship
Post by: Rodo on December 06, 2008, 04:40:15 pm
then you add a new line right after that one and set the hull to 0% and that's it, but it will not appear as destroyed by the beams in the events log.
Title: Re: Beam-protect destroyed ship
Post by: TrashMan on December 07, 2008, 03:34:43 am
Not AI Ignore... then it might actually sit there at 1% hull and never be killed unless the player does something. Try beam-protect-ship instead.

By the time the event triggers the ships will already be at 0 HP. HP goes down fast and the ordinance already fired won't stop.
Title: Re: Beam-protect destroyed ship
Post by: Vertigo 7 on December 07, 2008, 03:46:58 am
you could also remove the blow up times from the ship tables =p instant kaboom when hull hits 0
Title: Re: Beam-protect destroyed ship
Post by: psyhotik on December 07, 2008, 11:54:43 am
OK, big thanks guys :) I'll try some of this :)