Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: karajorma on March 08, 2003, 10:25:17 am

Title: Self Destructing Disabled Fighters
Post by: karajorma on March 08, 2003, 10:25:17 am
A post by Sesquipedalian on the General FS Board reminded me of a problem that I encountered a while back.

I was writing a mission where the player had to disable a wing of enemy fighters because R&D wanted to get hold of them.
 The problem was that although I could disable the ships a few minutes later I`d find they were gone and I had been credited with the kill.

 At first I didn`t know what was happening and blamed my wingmen but once I edited them out I actually watched a ship I`d disabled sit there for a minute and then suddenly blow up without anyone touching it.

I eventually managed to make a work around for the problem by repeatedly repairing and then sabotaging the subsystems of the disabled fighter but it had a very hacky feel to it (the ships damage indicate would flash all the time because of the damage repair cycle).

Anyway would it be possible to get a checkbox added to the mission specs editor to turn this off? That way we can have more missions involving disabling enemy ships.

I don`t actually want the problem fixed as I believe it is there for a reason (e.g. to prevent the player disabling the last ship in a wave and prevent any more waves arriving).
Title: Self Destructing Disabled Fighters
Post by: Goober5000 on March 08, 2003, 11:49:15 am
Mm.  Maybe.  Couldn't you just number the ships e.g. Aries 1-4 without actually putting them in Aries wing?
Title: Self Destructing Disabled Fighters
Post by: diamondgeezer on March 08, 2003, 12:30:08 pm
Goob, the point is that an enemy ship will self destruct after being disabled. That's the issue karajorma wants looked at.

The thing about disabling the last ship to prevent further wings showing up... perhaps simply count disabled enemy fighters as destroyed as far as the wing turning up code works? That's if you want to stop disabled ships blowing up, of course :)
Title: Self Destructing Disabled Fighters
Post by: karajorma on March 08, 2003, 12:48:09 pm
I don`t know if it would be a good idea to count disabled ships as destroyed as that simply replaces one bug with another.

I was thinking more along the lines of finding the code that makes disabled enemy fighters and bombers blow up and saying that it does that unless a mission flag or SEXP tells it not to. In which case the game leaves them alone until told to do something else.

With this done you can have missions where you capture enemy fighters rather than killing them (and I can think of lots of ideas like that which I never used cause it was too much hassle making repeating repair/sabotage events for every ship in the wing). :)
Title: Self Destructing Disabled Fighters
Post by: Bobboau on March 08, 2003, 01:07:06 pm
or perhaps a simple "no self destruct" flag that a mission designer could select if a fighter needs to be captured
Title: Self Destructing Disabled Fighters
Post by: karajorma on March 08, 2003, 01:11:22 pm
I`ve put together a recreation on the tests I did when I started gettting weirdness on this mission. They only take 5 seconds to put together but just in case any of you don`t go near FRED I`ve done it for you.

In the first try knocking out the engines and/or weapons subsytems of the bomber and you`ll soon see that they explode. The second is the same thing with a wing of Azraels. You'll note that they don`t explode in the same way.

EDIT : Actually that's probably even better than putting it in the mission specs Bobboau. :yes:
Title: Self Destructing Disabled Fighters
Post by: Sesquipedalian on March 08, 2003, 01:39:02 pm
I've always simply turned the disabled fighter's IFF to Friendly after disabling in order to get around this (as posted in reply to you in the other thread, kara), the justification being that the ship is at least no longer a threat, or more likely (since we want the fighter specifically not to blow up) it has become the target of some further action on the player's team's part.  However, Bobbaou's flag would be a great addition.
Title: Self Destructing Disabled Fighters
Post by: karajorma on March 08, 2003, 02:30:11 pm
A couple of problems with that approach are that

1) Just cause I`ve disabled a bomber doesn`t mean that it still shouldn`t shoot at me with its turrets.

2) Fighters with engines down should still shoot at you when you get into their line of sight.

3) You have to write a change-iff for EVERY ship you want disabled. Like I said it's not too bad for a wing or two but if you want to have a mission where you have to disable 6 or 7 wings they you`re going to need an awful lot of SEXP's.

4) When dealing with Terran or Vasudan opponents a disabled ship is still a threat cause they could be repaired by a supply ship (I know we never actually SEE one but the NTF and HOL must have had them) :) Having an enemy supply ship jump in and start repairing the disabled fighters was a twist I did originally consider having but decided against cause it was too much hassle for too little reward. On another mission though it could be a lot of fun :)

That said when dealing with Humans or Terrans you can say they`ve surrendered. Doesn`t work so well for Shivans though.
Title: Self Destructing Disabled Fighters
Post by: Goober5000 on March 08, 2003, 02:34:31 pm
An enemy ship will only self-destruct if it's in a wing.  Hence my suggestion to number the ships but not put them in a wing.

But Bobboau's flag sounds like a great idea. :yes:
Title: Self Destructing Disabled Fighters
Post by: karajorma on March 08, 2003, 04:05:34 pm
Wish I`d seen that earlier Goober. When I left after my last post I thought that might have been what you meant and tried it out. (It does work) :)

Anyway although it will work for a wing or two it would get annoying if there were a lot of wings. So I too like the idea of a flag.
Title: Self Destructing Disabled Fighters
Post by: Kazan on March 09, 2003, 02:51:51 pm
for missions like that you should when-ship-disabled change-iff
Title: Self Destructing Disabled Fighters
Post by: Bobboau on March 09, 2003, 03:04:37 pm
yes, that would also help to kep you're fingmen from killing your soon to be capured fighters
Title: Self Destructing Disabled Fighters
Post by: kasperl on March 09, 2003, 03:08:13 pm
but it would also keep the disabled fighter from shooting you and other friendly targets, a bit wierd.