Author Topic: Same Wings, different arrivals  (Read 3081 times)

0 Members and 1 Guest are viewing this topic.

Offline Molaris

  • 27
Same Wings, different arrivals
I'm looking to have 3 waves of fighters coming in a mission. I intend to use the same fighter/bomber wings and just have them arrive at 3 points in the mission. What would be the most effective way of doing this? I figured maybe "when event true" type of set up, but how would I set it up for 3 separate events? I thought an "and" would work, but wanted to make sure it wouldn't cause a problem. Thanks guys
"Hey, Mike, you think you can toss me my calculations? Thanks! Ah, here it is: "Breach Hull - All Die." Even had it underlined!" -Crow T. Robot-

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Same Wings, different arrivals
Easiest solution: don't use the same wing names.

As far as I'm aware, the only way to do want you want while keeping the same wing names is to bypass the wave system altogether and create new ships with SEXPs, which is a lot of effort just to avoid using more wing names.

(I may be wrong, of course; others are far more experienced with FRED than I.)
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Cyborg17

  • 29
  • Life? Don't talk to me about life....
Re: Same Wings, different arrivals
Just create three different wings with wing names that are like this

Beta#1
Beta#2
Beta#3

I think that is a work around for it.

 

Offline Axem

  • 211
Re: Same Wings, different arrivals
Assuming you want the numbers to continue to go from 1 and up (and not repeat), there's ways you could pull that off. Basically you just turn the arrival cues into "windows" where they turn true at the point they are supposed to arrive, and then false again shortly after. If an arrival cue turns false, any reinforcement wings won't arrive again. (If repeating numbers is okay, Cyborg's idea would work. There's a semi-recent code change that ensures the wing number is visible with wing names containing a #)

So its sort of like
Code: [Select]
when
-or
--and
---is event true delay
----event1
----0
---not
----is event true delay
-----event1
-----5
--and
----etc etc etc

This is also a neat way to keep friendly reinforcements at a good balance between "everyone dies 30 seconds in and never respawns" and "8 waves are needed to survive and do the work for the player"

 
Re: Same Wings, different arrivals
Just create three different wings with wing names that are like this

Beta#1
Beta#2
Beta#3

I think that is a work around for it.
IIRC, this should work since this year.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Same Wings, different arrivals
Just create three different wings with wing names that are like this

Beta#1
Beta#2
Beta#3

I think that is a work around for it.
IIRC, this should work since this year.
But then you'll get three different Beta 1s. If that's fine, that solution is easiest, but I'd personally go with Axem's solution (which I am totally going to make a note of... that's a useful trick).
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Same Wings, different arrivals
I'm looking to have 3 waves of fighters coming in a mission. I intend to use the same fighter/bomber wings and just have them arrive at 3 points in the mission. What would be the most effective way of doing this? I figured maybe "when event true" type of set up, but how would I set it up for 3 separate events? I thought an "and" would work, but wanted to make sure it wouldn't cause a problem. Thanks guys

What I do is to have the wing arrive "near" or "in front of" an invisible ship (like a navbuoy textured with "invisible"), and then use set-object-position on the ship.

EDIT: Never mind, I answered a different question than the one you asked. :p

 

Offline Molaris

  • 27
Re: Same Wings, different arrivals
Goober, I actually like that and will keep it in mind for future referance :-) thanks

Axem, you answered it EXACTLY. I had a strange feeling that the if I goofed it up, the game would create a loop of fighters warping in instead of one wave on cue. Thank you guys. You are all a great help
"Hey, Mike, you think you can toss me my calculations? Thanks! Ah, here it is: "Breach Hull - All Die." Even had it underlined!" -Crow T. Robot-

 

Offline Molaris

  • 27
Re: Same Wings, different arrivals
I'm gonna be honest, I'm a little lost. Axem's idea sounds great, but alcohol and exhaustion are messing with me, hahaha. So do I create the event in the event viewer and then go to arrival cues and have them arrive when the event is true? And would 3 separate refered to events within one event block work in the arrive cue? Just checking cause the arrival cue won't allow me to change the "true" argument to a "when". I'm still learning, but enjoying this more and more I do it. much appreciated!

and I have it all laid out, but what would I do with the "do nothing" line? seems like I am missing something.
« Last Edit: May 21, 2014, 09:23:54 pm by Molaris »
"Hey, Mike, you think you can toss me my calculations? Thanks! Ah, here it is: "Breach Hull - All Die." Even had it underlined!" -Crow T. Robot-

 

Offline Axem

  • 211
Re: Same Wings, different arrivals
Heh, whoops, yes the arrival cues would get all the ands and ors and is-event-trues. There is no when there, I just was a bit too much on autopilot on writing sexps in text. :)

[attachment deleted by an evil time traveler]

 

Offline Molaris

  • 27
Re: Same Wings, different arrivals
ooohhh, I made an event in even viewer. ok, thank you Axem. that helps much better


it didn't work, and I think it's because I added an "and" underneath the primary "and"

so I have
Code: [Select]
and
     is-event-true-delay
           AI Goal Add
           0
     not
          is-event-true-delay
              AI Goal Add
              5
     and
           is-event-true-delay
               AI Goal 3
               0
          not
               is-event-true-delay
                   AI Goal 3
                   5

is that other "and" screwing things up? I will recheck it asap, but I gotta get up early
« Last Edit: May 21, 2014, 10:17:04 pm by Molaris »
"Hey, Mike, you think you can toss me my calculations? Thanks! Ah, here it is: "Breach Hull - All Die." Even had it underlined!" -Crow T. Robot-

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Same Wings, different arrivals
Keep in mind that the "and" sexp can have more than two arguments.  You're not the first person to fail to realize that -- even Volition made that mistake!

 

Offline Axem

  • 211
Re: Same Wings, different arrivals
Also look back at my original sexp, the "root" logical sexp there is an OR before the ANDs.