Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: FUBAR-BDHR on December 06, 2007, 09:36:23 pm

Title: Ship vaporize and SD
Post by: FUBAR-BDHR on December 06, 2007, 09:36:23 pm
Been playing with vaporize and self destruct.  Is this supposed to just make the ship vanish completely as the name would suggest?  If so it doesn't.  Debris are left behind.  Not the targetable kind (at least not that I've seen) but the particles that float away and disappear.
Title: Re: Ship vaporize and SD
Post by: jr2 on December 07, 2007, 02:52:16 pm
There is a way to make a ship disappear, IIRC, but that's not it.. vaporize means no large chunks are left behind.
Title: Re: Ship vaporize and SD
Post by: Dark Hunter on December 07, 2007, 03:09:28 pm
Does ship-vanish cause them to just disappear?

Alternatively, you could just teleport the ships really far away... and make them untargetable, so the player wouldn't accidentally target them.

Either way, you might try looking at the code for certain missions in Transcend. It is the only campaign I've played that had ships simply vanishing (Ransom accompanied it with a lightning-fast fade-in/fade-out).
Title: Re: Ship vaporize and SD
Post by: karajorma on December 07, 2007, 03:21:50 pm
Alternatively, you could just teleport the ships really far away... and make them untargetable, so the player wouldn't accidentally target them.

Don't know about ship-vanish but that one certainly won't work in multiplayer unless you use the BtRL build or 3.6.10 builds. Turey discovered that the hard way.
Title: Re: Ship vaporize and SD
Post by: FUBAR-BDHR on December 07, 2007, 07:28:14 pm
OK the transport the ship sounds like a plan.  Transport it then self-destruct it.  That may be the solution to the whole thing. 

One question about ship vanish.  What would happen if you vanished a ship then did a self-destruct?  Might just have to try that.
Title: Re: Ship vaporize and SD
Post by: karajorma on December 08, 2007, 01:53:48 am
After a ship-vanish the ship is gone. It basically does all the back end stuff to do with making a depart but doesn't do any of the stuff you would see in-game. One second the ship is there and next it's not. You could try transporting it and then use an explosion-effect SEXP to generate the explosion yourself.

Be warned that ship-vanish doesn't work in multiplayer (I've checked now) and since it doesn't write to the event log certain SEXPs will still think the ship is present.
Title: Re: Ship vaporize and SD
Post by: FUBAR-BDHR on December 08, 2007, 02:24:16 am
Well I just tried using set-object-position to move the ship to 99999,99999,99999.  Now the problem is if you have the ship targeted it stays targeted.  I tried setting radar-set-max-range to 50000 and making the ship invisible before moving it but it still stays targeted.  Any way around this one?

Also I just tried self-destruct after vanish.  Doesn't work as expected but had to try it.  At least it didn't crash.
Title: Re: Ship vaporize and SD
Post by: karajorma on December 08, 2007, 02:54:17 am
Ah. Forgot about that. Make the ship stealthy (and friendly stealthy if it's a friendly ship). That will untarget it (on SP at least).
Title: Re: Ship vaporize and SD
Post by: FUBAR-BDHR on December 08, 2007, 12:11:25 pm
Thanks worked just fine that way. 
Title: Re: Ship vaporize and SD
Post by: Vidmaster on December 08, 2007, 12:35:02 pm
I used "invisible", seems to work too.
Title: Re: Ship vaporize and SD
Post by: FUBAR-BDHR on December 08, 2007, 02:50:11 pm
Invisible doesn't work if the ship is currently targeted.  Tried it in TBP 3.6.9 and in Taylor's 3.6.10 10-22 build.
Title: Re: Ship vaporize and SD
Post by: karajorma on December 08, 2007, 02:52:32 pm
I'm trying to decide if that's a bug or not. :D
Title: Re: Ship vaporize and SD
Post by: Vidmaster on December 08, 2007, 04:08:14 pm
damn.   Okay, modifying the mission again.
FURBAR, thanks for telling me about this thread. And I have to ask again: Do you still have that file with the rest of the errors? The typing ones are fixed (I hope), but I remember there were one or two controversal points left, I wanted to look those up...
Title: Re: Ship vaporize and SD
Post by: FUBAR-BDHR on December 08, 2007, 05:03:59 pm
Vid:  Check your email I sent you the files. 

Kara:  Which part is the bug?  The ship still being targeted when made invisible or the ship still being targeted when it's moved beyond max radar range?  Both maybe?
Title: Re: Ship vaporize and SD
Post by: karajorma on December 08, 2007, 05:36:56 pm
Both are probably bugs but since you can break the connection in the manner I mentioned I'm not certain whether it needs fixing or not.
Title: Re: Ship vaporize and SD
Post by: FUBAR-BDHR on December 08, 2007, 06:28:05 pm
Maybe just some notes about it in the Wiki then. 
Title: Re: Ship vaporize and SD
Post by: FUBAR-BDHR on December 14, 2007, 01:35:06 am
Found a new quark with this tonight.  Seems the ship stealthy work around might be a little buggy.  I tried creating an event to make the ship stealthy then make it unstealthy so it would untarget.  Tried in the same event which I figured wouldn't work and it didn't.  I then made a chained event.  Still didn't work.  Put a 10 second delay on the chained event.  Still didn't work.  Finally stored the mission time to a variable and created an event that checked the current mission time against the stored time.  Now it works.  It's like it totally ignores any delay and the unstealthy fires as soon as the ship becomes stealthy.  I even put messages in every event just to make sure the events were processing in the order expected.  Really strange. 
Title: Re: Ship vaporize and SD
Post by: karajorma on December 14, 2007, 05:16:41 am
That's very odd. Stick it in Mantis and I'll take a look. I'll probably fix the problem with ship-invisible too if I can figure out what causes it.
Title: Re: Ship vaporize and SD
Post by: FUBAR-BDHR on December 14, 2007, 10:36:24 pm
Well since the original test was in TBP 3.6.9 I moved it over to 3.6.10 3-28.  Seems that at least part of this has already been fixed.  The rest might be due to  a repeating event.  Does chaining to a repeating event work?  I know I've used it before somewhere but that's been years ago but it seems the problem starts as soon as I make the event repeating. 
Title: Re: Ship vaporize and SD
Post by: karajorma on December 15, 2007, 02:22:32 am
Chaining a repeating event never worked properly for me when I tried it. I use variables pretty much exclusively when I want to do something like that now anyway.
Title: Re: Ship vaporize and SD
Post by: FUBAR-BDHR on December 15, 2007, 01:59:51 pm
OK I won't worry about the repeating event part then.  Since the other part looks like it's fixed no need for a Mantis on this one. 

Let's see what can I try to break now...   :D
Title: Re: Ship vaporize and SD
Post by: Hellequin on December 26, 2007, 08:51:16 pm
Maybe I missed something. FUBAR is trying to make a ship disappear without a trace, right? Why not use ai-warp out with no warp effect?
Title: Re: Ship vaporize and SD
Post by: haloboy100 on December 26, 2007, 09:29:38 pm
Maybe I missed something. FUBAR is trying to make a ship disappear without a trace, right? Why not use ai-warp out with no warp effect?

I was about to say that after reading this. Isn't that how the guy (forgot your name, sorry) did it in Transcend?
Title: Re: Ship vaporize and SD
Post by: FUBAR-BDHR on December 26, 2007, 10:42:21 pm
Actually it wasn't me that was trying to do it.  I was just helping out.  The problem is if you want a ship to leave the area when you are supposed to destroy it it will not leave the directives.  Only way to get it to subtract off the directive is to destroy it.  Destroyed-or-departed-delay does not include a ships remaining  count down in the directive box.
Title: Re: Ship vaporize and SD
Post by: jr2 on December 27, 2007, 01:32:28 am
Hmm.  So, you want it to disappear without and explosion when it is destroyed?  Is that it?  Or do you simply want there to be no debris?  Spell out exactly what you want.  Then, I'm sure karajorma can hack something out.  XD
Title: Re: Ship vaporize and SD
Post by: Hellequin on December 27, 2007, 04:58:27 am
Oh, I get it now. And it sounds like you got it to work with teleport ship and destroy so that's cool. Cheers!