Bahger Posted January 21, 2013 Posted January 21, 2013 Gents, I'm coming back to mission design now that I can put flyable FC3 aircraft in the ame scenario as the A-10C. I'd like to make a scenario with missions for both the F-15C and the A-10C. I need to figure out how to get the AI to fly the Hog flight's CAS mission should the player choose the Eagle flight's CAP sortie, and vice versa. I know this is about a small piece of code that enables an AI flight to spawn (and a client flight not to spawn) when the player chooses an alternative client. I can't quite get my head around how to do this and I'd rather know than spend hours experimenting. If it's possible to do in the ME UI rather than with lua, that would be even better, as lua programming is way above my pay-grade. My other (associated) question is: If I design this as an MP mission playable in SP, should I designate the flyable aircraft "Player" or "Client" And in MP how can I get around the fact that I need to plot a separate a/c and flight plan for every single potential player-flown aircraft? Apologies if I'm repeating myself. I think grimes may have answered this some time ago but I cannot find the thread. Mea culpa.
Grimes Posted January 21, 2013 Posted January 21, 2013 Guess I will answer it again. :) Basically you have to add in an AI flight to replace the client aircraft. For the F-15C and A-10C AI flights simply set both to late activation and also create a trigger zone that takes up the entire area of the map. Then use triggers like: Once> Unit (client A-10C) not in Zone> Group Activate (AI A-10C) Once> Unit (client F-15C) not in Zone> Group Activate (AI F-15C) Client aircraft "do not exist" when they are not spawned in, thus the aircraft is outside the zone. You could also add a timer so the AI flight won't spawn in if the player is shot down. Which would look like: Once> Unit (client A-10C) not in Zone and time less than 30 seconds> Group Activate (AI A-10C) Player and client both work. Essentially if there is a unit with skill "player" and no other units set to "client" then the player will automatically spawn into whatever the aircraft is. If there are clients in the mission the player will be prompted in by a screen to select which aircraft they want to spawn into. However it is probably best to just stick with "client" for all skill settings. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Bahger Posted January 21, 2013 Author Posted January 21, 2013 Thanks, Grimes. I hope I will reward your patience with fine missions.
Bahger Posted January 21, 2013 Author Posted January 21, 2013 If I want to test the mission with AI flying both client flights, will the sim allow that, or is the player required to fly one of the client a/c?
Grimes Posted January 21, 2013 Posted January 21, 2013 No, the AI have to be their own flight. As long as you spawn both AI into the mission, they will do their flight. Simply uncheck "late activation" so the AI will spawn into the mission at mission start. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Bahger Posted January 21, 2013 Author Posted January 21, 2013 (edited) What is the idea of "Late Activation"? It's a new feature that I searched in the DCSW User Manual but came up blank. And is it still necessary to set a start time of 11 hours after mission start for a unit that you want to spawn in per condition? Edited January 21, 2013 by Bahger
Grimes Posted January 21, 2013 Posted January 21, 2013 It was added to make group activate a little easier to understand. Before you had to set a groups start time to some time after the start of the mission and then use the group activate trigger to spawn the group. Now you can just click "late activation" and then use the group activate trigger. The old method still works and it can be useful, but the group will still automatically spawn in whenever the time is reached (which is how its useful). But late activated groups will ONLY spawn in if the group activate trigger is used. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Ripcord Posted January 21, 2013 Posted January 21, 2013 Related question, Grimes -- can we have a CLIENT or PLAYER flight with an AI wingman in the same flight? Obviously that works in Single Player, but I have not tested it in MP. [sIGPIC][/sIGPIC]
Bahger Posted January 21, 2013 Author Posted January 21, 2013 As far as I know, this has never been possible in DCS. Client flights have to be placed on the map as individual a/c; only AI can be deployed as flights. Only in SP, therefore, can the player fly with AI wingmen. It's a regrettable quirk of this sim family.
Jona33 Posted January 21, 2013 Posted January 21, 2013 As far as I know, this has never been possible in DCS. Client flights have to be placed on the map as individual a/c; only AI can be deployed as flights. Only in SP, therefore, can the player fly with AI wingmen. It's a regrettable quirk of this sim family. I'm not sure, I think it might be possible. Always remember. I don't have a clue what I'm doing
Grimes Posted January 21, 2013 Posted January 21, 2013 Yeah it should be possible now. The last time I tested it was 1.2.0 and I think it works for clients. However its implementation is kind of derpy as the player has no choice if they get AI wingmen or not. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Ripcord Posted January 21, 2013 Posted January 21, 2013 Yeah it should be possible now. The last time I tested it was 1.2.0 and I think it works for clients. However its implementation is kind of derpy as the player has no choice if they get AI wingmen or not. OK, that is an item to test -- really got to learn to fly MP. [sIGPIC][/sIGPIC]
Bahger Posted January 22, 2013 Author Posted January 22, 2013 I think it works for clients. However its implementation is kind of derpy as the player has no choice if they get AI wingmen or not. Well wouldn't that defeat the object of the exercise? I'd be very pleasantly surprised if one could organise Client a/c into groups so that (i) you do not have to draw up the same flight plan four times for a four-ship flight (without even being able to "copy flightplan") and (ii) a human player flying by himself in MP could have the AI fly a Client aircraft from the same flight on his wing. Unless I am misunderstanding something, however -- and, as always, I doff my cap to Grimes in these matters -- I don't think the ME can offer this functionality; in fact I seem to remember Matt Wagner acknowledging that the engine just won't support Client groups or AI/Client flight sharing in MP.
Home Fries Posted January 25, 2013 Posted January 25, 2013 Well wouldn't that defeat the object of the exercise? I'd be very pleasantly surprised if one could organise Client a/c into groups so that (i) you do not have to draw up the same flight plan four times for a four-ship flight (without even being able to "copy flightplan") and (ii) a human player flying by himself in MP could have the AI fly a Client aircraft from the same flight on his wing. Unless I am misunderstanding something, however -- and, as always, I doff my cap to Grimes in these matters -- I don't think the ME can offer this functionality; in fact I seem to remember Matt Wagner acknowledging that the engine just won't support Client groups or AI/Client flight sharing in MP. I was just thinking something along these lines. I used Grimes' OP suggestion to create single ship AIs for unutilized clients, and it works great. One idea I was toying with was to create duplicate flights that have AI as wingmen, so that if you know you're the only one flying with the F-15C you choose "Flight Lead + 3" as opposed to just "Flight Lead". However, the combinations for this with the existing trigger logic make this very difficult to implement, not to mention unwieldy. I would love to see the ability in the ME to assign someone to a different client aircraft than the one they have chosen if certain parameters are met. For example, Once>(Client F-15C Lead)In Zone and (Client F-15C -2)Not In Zone>Assign (Client F-15C Lead) to (Client F-15C Lead + 1), which would then automatically give the flight lead an AI wingman. Along with this, the ability to force different units to the same parking spot would be great, as right now with aircraft at a smaller airport (like Batumi) I have only 10 parking spots, which means that the AI pilots realistically need to start airborne. -Home Fries My DCS Files and Skins My DCS TARGET Profile for Cougar or Warthog and MFDs F-14B LANTIRN Guide
Recommended Posts