Author Topic: AI Wing escorts question  (Read 2163 times)

0 Members and 2 Guests are viewing this topic.

Offline Doko

  • 26
AI Wing escorts question
I'm almost done with an escort mission and after nearly going insane trying to figure out how to do proper escorts for a shivan bomber wing I decided to go with the following. Unfortunately it seems rubbish and I can't expand the method for further waves. Help would be appreciated

- Fighter wing = taurus
- Bomber wing = gemini

The entrance queue for taurus is the following



Just to clarify. My goal is for every time a wave of bombers arrives for their escort wing to arrive as well using near ship spawning point. Should i just scratch the idea and make a wing of fighters and bombers and just give them individual orders?

[attachment deleted by ninja]

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: AI Wing escorts question
This is tricky to do because if the escort wing isn't totally destroyed when new bombers warp in, a new escort wing won't warp in as well.

What I'd do is just have a new fighter escort wing for each wave of bombers. Have the first escort wing's arrival cue be set to Gemini 1, the next to Gemini 4 (assuming it's a 3-ship bomber wing), the next to Gemini 7...so on.

  

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: AI Wing escorts question
Really the only way to do it the way you had is to use variables and like GB said it's tricky.  Pretty much 2 events.  One that sets the variable to 1 when the wing is supposed to arrive and one that sets it to false when they arrive.  You will probably need to use when-argument has-arrived-delay with a list consisting of the first wing in each wave.  (Gemini 1, Gemini 7, Gemini 13, etc assuming a wing of 6).  That along with num-ships-in-battle for the other operator should do it. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Doko

  • 26
Re: AI Wing escorts question
edited out. 

Found my answer thanks to you guys and this old topic
http://www.hard-light.net/forums/index.php/topic,64500.0.html

I was not aware fred dint care about arguments when you used when-argument over when.

« Last Edit: February 05, 2011, 06:51:29 pm by Doko »

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: AI Wing escorts question
No make a variable named something like escortarrive with a value of 0.  Set the tarus wing's arrival to escortarrive = 0 and gemini's arrival to escortarrive = 1.  Now in the events editor have an event like this:

when-argument
--in-sequece
---Gemini 1
---Gemini 7
---Gemini 13
---Etc
--and
--- =
----escortarrive
----1
---has-arrived-delay
----whatver delay
----<argument>
--modify-variable
---escortarrive
---1
--invalidate-arguemnt
--<argument>


when-argument
--in-sequece
---Taurus 1
---Taurus 7
---Taurus 13
---Etc
--and
--- =
----escortarrive
----1
---has-arrived-delay
----whatver delay
----<argument>
--modify-variable
---escortarrive
---2
--invalidate-arguemnt
--<argument>

Now you will need another event to make sure that Gemini and Taurus are dead.  Something like this:

When
--and
--- =
----escortarrive
----2
--- =
----num-ships-in-battle
-----Gemmi
-----Taurus
----0
--modify-variable
---escortarrive
---0

So it stars at 0, Gemini arrives it's incremented to 1 which triggers Taurus to arrive and it's set to 2 while those current waves are active.  When the bombers and escorts are destroyed it resets to 0 making Gemini's next wave arrival valid and so on.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Doko

  • 26
Re: AI Wing escorts question
Thank you.

That's exactly what i needed.

 

Offline Doko

  • 26
Re: AI Wing escorts question
On a follow up of this. Is it possible to also use an argument not on the list of possible locations?

In the mission I was working on there aren't any other hostiles around so using Near ship -> any hostile worked fine but what if there is more than one?

I was thinking of a work-around if not but I haven't tested it yet.

- when-argument
in-secuence
Gemini 1 4 7
has arrived delay
set-object-position
<name of invisible ship>
+500 <get object X>
gemini
+500 <get object Y>
gemini
+500 <get object Z>
gemeni
invalidate
<argument>

repeat times = waves

And set the arrival point of the waves @ the invisible ship

 

Offline Scotty

  • 1.21 gigawatts!
  • 211
  • Guns, guns, guns.
Re: AI Wing escorts question
At that point, all of the wings have to arrive for the event to fire, it doesn't do it every time they jump in.

That, and I don't think you'll find a Gemini 7 in the ships list if you're using a 3-ship wing for Gemini.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: AI Wing escorts question
At that point, all of the wings have to arrive for the event to fire, it doesn't do it every time they jump in.

That, and I don't think you'll find a Gemini 7 in the ships list if you're using a 3-ship wing for Gemini.

He's using arguments so he can just type it in, he doesn't have to pick it from the ship list. Same trick used to perform FRED operations on ship-created stuff.