Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Kinman on November 21, 2008, 08:50:13 am

Title: Rearming / Support ship
Post by: Kinman on November 21, 2008, 08:50:13 am
Hi. I want to do something after the player has rearmed.
I set a support ship manual and used the is-undocked-delay with the supportship and the player, but it didn't work.

(http://photo-sorko.at/bilder/sexp_rearm.gif)
I tried to swap Support 1 and Alpha and with different delays, but nothing happens. The support ship is docking, rearming and undocking but the event didn't fire...

Is there anything like has-rearmed-delay or do you have any other idea?

Thank you, Kinman
Title: Re: Rearming / Support ship
Post by: Angelus on November 21, 2008, 08:56:49 am
What are ya trying to do?
Title: Re: Rearming / Support ship
Post by: Kinman on November 21, 2008, 09:27:56 am
Hmm... I really don't want to talk about this yet... It should be a little surprise in my campaign and there's no other way to do this. I must know when the supportship either docks or undocks.
I'm testing it with send-message.
Title: Re: Rearming / Support ship
Post by: Colonol Dekker on November 21, 2008, 09:41:53 am
What about using a . . . . .

"once secondary count -Alpha 1 - <50%
AND
once secondary count -Alpha 1-  >99%

delay - 1

Then - send message / self destruct / supernova start (for example ;))
Title: Re: Rearming / Support ship
Post by: karajorma on November 21, 2008, 09:43:38 am
Test it with something that can't fail. Like Self-destruct Alpha 1 :D There are several reasons why a message could fail to be sent.

If you actually put a support ship in the mission rather than allowing the player to call it in themselves that should have worked though.
Title: Re: Rearming / Support ship
Post by: Colonol Dekker on November 21, 2008, 10:09:25 am
But my theory is sound right? :nervous:

/me awaits the green light from Karajorma.
Title: Re: Rearming / Support ship
Post by: CP5670 on November 21, 2008, 10:40:53 am
Use when-argument with Support 1 specified manually and has-docked-delay. You can use it like this to do things with ships that aren't in the mission file itself.
Title: Re: Rearming / Support ship
Post by: Kinman on November 27, 2008, 05:02:17 am
I've tried everything i could imagine and nothing worked.... I took me three days.
I wanted to change the secondary loadout with a support ship. The loadout-change works perfectly but i don't get an event when the supportship docks/undocks.

It was only a minor "goodie" but I canceled it.

Greetings Kinman
Title: Re: Rearming / Support ship
Post by: Galemp on November 27, 2008, 10:21:29 pm
hmm.

You could hack it with a distance SEXP.
Title: Re: Rearming / Support ship
Post by: Black Wolf on November 29, 2008, 10:56:08 pm
But my theory is sound right? :nervous:

/me awaits the green light from Karajorma.

I don't think so. That event would fire as soon as your secondaries dipped below 50%, since FS would recognizer the >99% as soon as the mission started. You might be able to do it with and-in-sequence, if and-in-sequence wasn't so **** (though this sounds like something it's pretty much designed for). Plus you'd need to make sure the secondaries dipped below fifty percent - the sexp wouldn't fire if you rearmed at fifty one percent, for example.

It might work with

Code: [Select]
and-in-sequence
 - <
 - -secondary-ammo-pct
 - - - Alpha 1
 - - - 4
 - -99%
 - >
 - -secondary-ammo-pct
 - - - Alpha 1
 - - - 4
 - -99%
Title: Re: Rearming / Support ship
Post by: karajorma on November 30, 2008, 04:19:37 am
There's nothing wrong with and-in-sequence. It's just that people misuse it and then think it's broken. :)
Title: Re: Rearming / Support ship
Post by: Black Wolf on November 30, 2008, 04:36:38 am
I know that on a conscious level. But I've got a deeply ingrained dislike of it and I'm not going to give that up over something as trivial as "the facts".
Title: Re: Rearming / Support ship
Post by: karajorma on November 30, 2008, 04:56:16 am
Can't say I blame you. I'm a little wary of it myself. It's very easy to trap yourself into doing something very stupid with it. :)
Title: Re: Rearming / Support ship
Post by: Titan on November 30, 2008, 09:38:07 am
Or in my case, crashing the game.  :nervous:
Title: Re: Rearming / Support ship
Post by: karajorma on November 30, 2008, 11:42:16 am
Huh?