Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Akalabeth Angel on September 14, 2004, 03:45:56 am

Title: Wing Question
Post by: Akalabeth Angel on September 14, 2004, 03:45:56 am
Let's say I make a mission where a ship arrives and is guarded by various fighters. I give the fighters a high enough wing count that the ship will always be guarded.

At some point, the ship will leave. Now how do I get the wings to stop arriving? Or do they just not arrive after the current fighters in the area are killed??
Title: Wing Question
Post by: karajorma on September 14, 2004, 04:01:25 am
Don't use the words wing and wave interchangably. You'll confuse people :D

To get waves of fighters to stop appearing is a little tricky. IIRC the only way to stop waves appearing is to give the fighters orders to depart. The problem you probably have is that you don't want the enemy ships to depart, mearly to stop receiving reinforcements.

I've got an idea for a solution but I'll have to try it out first as I've never had this particular problem.
Title: Wing Question
Post by: Akalabeth Angel on September 14, 2004, 04:11:17 am
Quote
The problem you probably have is that you don't want the enemy ships to depart, mearly to stop receiving reinforcements.


   Oh I want them to leave. If the ship their guarding is gone why would they stick around? Hmmn, looking at my mission I thought I had put a depart bit where when the ship is gone, the wing leaves too. Seems that I don't have it now though. So I'll have to stick it in tommorow (probably upload an updated mission tommorow)
Title: Wing Question
Post by: Cetanu on September 14, 2004, 04:18:53 am
use an Arrival Cue like this for the fighter wing

$Arrival Cue: ( and
   ( has-arrived-delay XX "SHIP" )
   ( is-event-incomplete "SHIP gone" )
)


and  a Departure Cue like

$Departure Cue: ( is-event-true-delay "SHIP gone" )


and do a "SHIP gone" event like that

$Formula: ( when
   ( and-in-sequence
      ( has-arrived-delay XX "SHIP" )
      ( destroyed-or-departed-delay
         XX
         "SHIP"
      )
   )
Title: Wing Question
Post by: karajorma on September 14, 2004, 04:19:51 am
Fair enough. Glad I double checked before tinkering around in FRED :D

Might do that anyway though. I like tinkering in FRED :)
Title: Wing Question
Post by: Cetanu on September 14, 2004, 04:21:49 am
doublepost ;)
Title: Wing Question
Post by: karajorma on September 14, 2004, 04:25:48 am
That will work for the situation Akalabeth is after but if you want the curent wing to remain and fight Alpha you have more problems.

Off the top of my head the only solution I could think of involves recording the percentage of ships in that wing which have been destroyed to a variable and then using that variable to check when all the ships in that wave are destroyed. Seems like a rather complicated situation to me and I'm wondering if I'm missing something much simpler.
Title: Wing Question
Post by: Cetanu on September 14, 2004, 04:29:24 am
the current wing or the current wave should stay around an fight? :D
if its the first make no departure cue at all and just give it orders to fight Alpha

if you ment the wave - and since there are no respawns in singleplayer tihs departure cue should work for the current wave

$Departure Cue: ( and
   ( is-event-true-delay "SHIP gone" 0 )
   ( percent-ships-destroyed 100 "Alpha" )
)

or use is-destroyed-delay 0 "Alpha", both should work in SP without respawns
Title: Wing Question
Post by: karajorma on September 14, 2004, 04:41:15 am
Not sure I follow you so let me give an example.

Suppse Cancer wing is set to have 5 waves. If the freighter they are after is destroyed after 2 waves are gone the enemy stop sending any more waves but you want the current wave to stick around and fight Alpha.

How can you set that up so that the waves stop coming immediately after the freighter is destroyed but the current wave (whatever it is) sticks around to fight?

EDIT : No sooner do I post this than I come up with a smarter solution. Give them orders to depart but break their warp drives :lol: That should take care of the problem :) Assuming of course that breaking the warp drive on Cancer 1 in wave 1 breaks it on Cancer 9 in wave 3 etc.

Hmmmm. This still requires some tinkering :)
Title: Wing Question
Post by: Cetanu on September 14, 2004, 04:42:13 am
damn, kara you are to fast - the answer is in my edited version of the reply :P :D
edit: no warp drive breaking necessary just use the suggested arrival cue from the 1st post and the departure cue of the 2nd ;)
Title: Wing Question
Post by: karajorma on September 14, 2004, 04:50:02 am
I think I'll have to FRED this. Something seems wrong with your suggestion but I can't quite put my finger on it.

Maybe I'm just having a bad day today :)
Title: Wing Question
Post by: Cetanu on September 14, 2004, 04:52:22 am
go for it, doesn't matter that I made already missions where I used the upper A/D Cues... they work :)
Title: Wing Question
Post by: karajorma on September 14, 2004, 06:19:45 am
The Arrival cue is fine. I'd forgotten that the arrival cue is checked for every wave not every wing. (Second time I've forgotten this. Hopefully I'll remember this time :rolleyes: ).  As soon as you said that I was too fast I remembered it and the post suddenly made more sense.

The problem I was having was with this bit.

Quote
Originally posted by Cetanu
$Departure Cue: ( and
( is-event-true-delay "SHIP gone" 0 )
( percent-ships-destroyed 100 "Alpha" )
)

and do a "SHIP gone" event like that

$Formula: ( when
   ( and-in-sequence
      ( has-arrived-delay XX "SHIP" )
      ( destroyed-or-departed-delay
         XX
         "SHIP"
      )
   )


Couldn't figure out why you didn't just leave it at false but I see what you're doing now. You want the enemy ships to jump out once they've killed Alpha :D

I guess I was having a bad morning after all :)
Title: Wing Question
Post by: Cetanu on September 14, 2004, 11:11:40 am
see I asked that too:
Quote
Originally posted by Cetanu

if its the first make no departure cue at all and just give it orders to fight Alpha

anyway, I have lots of such mornings too... :D
Title: Wing Question
Post by: karajorma on September 14, 2004, 03:44:20 pm
Well if nothing else I've made the Newbie FREDders working through the FRED Academy feel better about their own mistakes :lol: