Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: T-Man on July 23, 2008, 10:34:27 am

Title: Problem: Sobek refusing to warp
Post by: T-Man on July 23, 2008, 10:34:27 am
I'm doing a mission involving a Sobek-class ship needing to warp out at the end, but the thing refuses to do so. I've tried every command method i can think of to get this thing to jump, but it just sits there.

I vaguely remember someone mentioning a bug with the FSOpen Sobek, so i wanted to double check it with the board.

Here's the SEXP i'm using at the moment:
Code: [Select]
- When
    - not:
             - is subsystem destroyed delay
                        - Thutmose
                        - Engine
                        - 21 (There's alot of speech before it jumps)
    - add goal
             - Thutmose
             - ai Warp out
                         - 89

(This is with the non-htl sobek btw, and i don't know if its related, but i noticed the sobek doesen't have any engine glows in my game).

I would appreciate any help with this; its the first time i've done a polished mission (difficulty-based modifications, failiure debreifings and everything), and this is the only thing stopping me from releasing it. :(
Title: Re: Problem: Sobek refusing to warp
Post by: Colonol Dekker on July 23, 2008, 10:37:12 am
Use "is event true" delay instead........ :yes:

Just reference the event that triggers the speech.
Title: Re: Problem: Sobek refusing to warp
Post by: T-Man on July 23, 2008, 10:42:46 am
Use "is event true" delay instead........ :yes:

Just reference the event that triggers the speech.

I was what i was using origionally (when event true, delay of 21 seconds) and it would just sit there.

I'll give it another try though.

(EDIT: Nope, still not working).
Title: Re: Problem: Sobek refusing to warp
Post by: Colonol Dekker on July 23, 2008, 11:09:27 am
*picks up the K-Phone and lights the K-Signal.......*

Now we wait for Kaptain Karajorma...........


Umm wait a sec, why arent you putting it in the departure cue for the Sobek?

Like here:

Also ignore that limewire tab :nervous:

[attachment deleted by admin]
Title: Re: Problem: Sobek refusing to warp
Post by: Black Wolf on July 23, 2008, 11:18:25 am
Just looking at it, assuming it's not chained to anything, that should fire... well, 21 seconds after the sobeks engine is not destroyed, which, depending on whether FS takes it from the beginning of the mission or when it warps in might cause your problem.

Does the corvette warp in after the mission begins? It might be that FS is trying to make it warp out 21 seconds after the start of the mission, but since it hasn't arrived yet, it wont. Try inserting an and-in-sequence, using your current not event as the second step and use an is-event-true, somehwere near the end of the mission for part one. See if that helps.
Title: Re: Problem: Sobek refusing to warp
Post by: T-Man on July 23, 2008, 11:46:40 am

Umm wait a sec, why arent you putting it in the departure cue for the Sobek?


Tried that too. Still didn't work. The thing just refuses to jump.

It starts the mission disabled, then at a point the mission repairs the engine subsystem (the event that triggers this one) and the ship should wait 21 and then warp out.

I'll add on an is-event-true to make sure its not triggering early.

EDIT: I think i've sussed the problem; i may be onto a bug here. Was testing a sobek out in a test mission. If the ship is normal, then it jumps. But if its engines begin the game disabled, and are then repaired. It will ignore all departure SEXPS from the point after it was disabled.

Definetly a bug, it even refuses player-given depart orders. I'll see if its the same with other ships.
Title: Re: Problem: Sobek refusing to warp
Post by: Colonol Dekker on July 23, 2008, 11:56:15 am
*checks the K-Phone, recieves a p155 off answerphone message" Well i dunno where Kaptain Karajorma is..
Title: Re: Problem: Sobek refusing to warp
Post by: T-Man on July 23, 2008, 12:13:38 pm
It is the same with other ships. If any SEXP fiddles with the engine sybsystem (even if it doesent destroy it), the ship will refuse any depart SEXP or order from that point onward.

I had an Aten and a SEXP made took its engine system from 100 to 11. It then refused to depart.
Title: Re: Problem: Sobek refusing to warp
Post by: karajorma on July 23, 2008, 12:14:01 pm
That's not a bug. It's a (completely understandable) misunderstanding of how the is-subsystem-destroyed-delay SEXP works.

Here's a very important tip for dealing with that SEXPs along with ones like is-destroyed, is-departed, etc, treat them as WAS-subsystem-destroyed-delay not IS. All of those SEXPs do not check the current status of the ship. What they instead do is check the mission log. Since the engines were destroyed it appears on the mission log and the SEXP returns true even if at some later point the engines are repaired. If you respawn a ship using ship-create the same thing happens. I'm not certain about multiplayer respawning, I'd have to check the code (which I can't at the moment).


Yes it's strange. I suspect the main reason is so that you can check if a player disabled or disarmed a ship or subsystem before it warped out/was destroyed. Obviously if a ship is destroyed you can't check if a turret on it is dead.


In the case of the Aten ships will not depart when given orders to depart if their engine subsystem isn't over a certain percentage 30% IIRC but I could easily be wrong about the value.
Title: Re: Problem: Sobek refusing to warp
Post by: T-Man on July 23, 2008, 12:31:53 pm
I see, so it'll keep true even if the engine is restored later in the mission.

Is there any way to overide it? Having the Sobek warp out is needed for the mission to end.

I'll run through the code and remove any use of the "Is-subsystem-destroyed" SEXP, and see if it works then.

Thanks for your help btw everyone.
Title: Re: Problem: Sobek refusing to warp
Post by: Colonol Dekker on July 23, 2008, 12:37:47 pm
Hope you post it here when complete, and PM me to let me know where it is :yes:

Title: Re: Problem: Sobek refusing to warp
Post by: T-Man on July 23, 2008, 12:48:56 pm
It doesen't make any more references to the "is-subsystem-destroyed" SEXP, but the ship still sits there. Could it be because its engine subsystem is below 30% like the Aten?

If you guys want, i'll post up the unfinished mission here so you guys can have a look over my SEXPs to see if its anything i'm doing. Most of the mission is there, its just the very end that isn't.
Title: Re: Problem: Sobek refusing to warp
Post by: Colonol Dekker on July 23, 2008, 12:56:04 pm
Couldn't hurt but i'm mobile at the moment and couldn't check but i'll look as soon as i'm home "yes"
Title: Re: Problem: Sobek refusing to warp
Post by: T-Man on July 23, 2008, 01:08:48 pm
Here ya go. As i said, most of the mission is there, you just can't Alt-J without getting the fail debreif, since the objective completion depends on the Sobek warping out.

[attachment deleted by admin]
Title: Re: Problem: Sobek refusing to warp
Post by: karajorma on July 23, 2008, 02:25:29 pm
Is there any way to overide it? Having the Sobek warp out is needed for the mission to end.

Hits-left-subsystem should work.

Be warned that one has a nasty gotcha of its own but since you're using it to check if the ship can warp out you should be okay with checking if it's 30%.