Papagon2 Posted November 25, 2022 Posted November 25, 2022 Hello, I am making a mission on IL-2 BOS after long time. So now I dont remember how I did it all. I try to be simplified with my questions: 1. AI do not spawn while I am flying over the checkzone. My trigger setup: Mission begin -> Timer3s -> Checkzone1(inside) -> Timer3s -> Trigger activate - Timer3s -> Checkzone2(outside) -> timer3s -> Trigger deactivate - Checkzone1(inside)// Loop All AAA guns are linked to Activate and Deactivate triggers. What am I missing? 2. cancle cercle over airports in game. I use AI behaviour triggers on the airports since I try make CTA mission. I have added planes to the airfield but still in-game it comes cancle cercle over them. Regard all help. Sorry for bad English.
Sketch Posted November 25, 2022 Posted November 25, 2022 Looks like you're missing object linking of some of the MCUs, however I can't really tell because your drawn-in arrows are overtop of the editor arrows. Maybe post your mission and one of us can take a look at it for you.
Papagon2 Posted November 25, 2022 Author Posted November 25, 2022 3 minutes ago, Sketch said: Looks like you're missing object linking of some of the MCUs, however I can't really tell because your drawn-in arrows are overtop of the editor arrows. Maybe post your mission and one of us can take a look at it for you. Sorry i used the arrow drawings so it was easier for you guys to see what went were. (Tought it was easier) The object linking is there, I have just unchecked them since that would be allot of green arrows. But anywais I found my older post for this kind of help and see there my first question has allrdy been corrected. ? But my 2nd question is still a no go. (attached file is the mission for 2nd question) KEEP in mind! The mission is missing allot of its content needed to be a running DF Mission. Airfield_Capture_v1.7zip
Sketch Posted November 25, 2022 Posted November 25, 2022 I've taken a look at your mission and I think I understand what you want to do. I assume you are attempting to allow either Allies or Axis to capture a particular airfield, depending on which side currently owns that airfield. This is an interesting challenge, and requires a pretty complex set of logic. Give me a little bit to see if I can solve it.
Papagon2 Posted November 25, 2022 Author Posted November 25, 2022 34 minutes ago, Sketch said: I've taken a look at your mission and I think I understand what you want to do. I assume you are attempting to allow either Allies or Axis to capture a particular airfield, depending on which side currently owns that airfield. This is an interesting challenge, and requires a pretty complex set of logic. Give me a little bit to see if I can solve it. True, true.. I did manage it to work last time I made it. But had some problems with AI planes than. Got new pc and extracted mission over to new PC ended up in "error reading mission file!" If I could solve that, I would be managed to see what I did there. This is most 1 year from now so maybe old files?
Sketch Posted November 25, 2022 Posted November 25, 2022 (edited) I have it working now. Your logic wasn't working at all for me, so I started over from scratch. Here's what it looks like. If you don't care about how the logic works and just want to use my template, skip till you get to the modification section of this tutorial. So many red, green, and purple lines... Oh my! So, there's a lot of moving pieces here, but the basic concept is: Players destroy enough entities at a Capturable Airfield -> influence zones, the airfield respawner, and blocks and vehicles will change hands to the other coalition. There are some catches though. Blocks can not switch sides mid-mission and blocks can not be despawned or respawned in. To get around this, I'm using specific blocks for Allied and specific blocks for Axis. Because the blocks can not be despawned, when a side controls the Capturable Airfield, the other side's blocks will look destroyed on the airfield. Players may wonder why there's a destroyed Axis plane parked at the hanger, when they're flying Allied. There is no way around this unfortunately. Here we can see that I have individual blocks for each side. This is because blocks can not be converted to a particular side and because blocks can not be despawned. The only choice is for us to make the blocks that are not owned by the Capturable Airfield to look destroyed. Additionally, you will probably want players to attack hangers, dugouts, and other block entities that could be used for both sides of the conflict. However, I highly recommend not doing this. Again it's because you can not flip a block to another coalition mid-mission and because a block can not be despawned. Because it could lead to confusion for the players. Do I attack this entity or not? This caponiers and tents can be used by both sides. We don't want to confuse players on what they can attack and what they can not. So, it's best to not use block entities that are used by either coalition to determine if the airfield can be captured or not. Another issue with these blocks we don't want destroyed, is their country code. They can't be set to a specific side, or else they'll give friendly fire messages. What can we do then? There is not really any choice but to set the blocks as Neutral and maybe add some 'flavor text' to the mission briefing. "Go ahead and kill planes and vehicles, but don't destroy the airfield!" Players will still get friendly fire messages when they attack these neutral blocks, but at least (if they read the mission briefing) they know that they shouldn't attack them and the friendly fire message will make sense to the player. We have no choice but to make the blocks we don't want destroyed neutral. This could lead to confusion for the players, but if you include some flavor text in your mission briefing; it could help clarify what should and should not be attacked at a Capturable Airfield. Okay, blocks are a pain, but I've done my best to get around the issues. Next is vehicle entity issues. Naturally, I could have used the same vehicles for both sides; however, I thought it looked way better when the vehicles matched their coalition. It'd be silly and lead to confusion for your players to have an Opel be linked to the Allies. So, I used specific vehicle entities for each side. Additionally, while there's 40 vehicle entities here (this could be server performance issue), you don't need to worry, each side only has 20 vehicle entities, and only 20 vehicle entities will spawn in at the airfield, and only if players are near that Capturable Airfield. While there's actually 40 vehicles per Capturable Airfield template, only 20 vehicle entities will be active at one time. For additional performance gains, the vehicle entities also remove themselves when players are not near, and spawn back in when players are near. This is through the my Checkzones logic. It's pretty simple logic, and I've used this logic for nearly all the missions I've made. Basically, the "Inside" will start up the Capturable Airfield vehicles, and the "Outside" will remove the vehicles. When players are "Inside" the Checkzones, then we activate and spawn in all available vehicles. In your logic, you had a single Spawner MCU to all of your vehicles. In my experience, that has led to issues with Counter MCUs, and I fully believe each vehicle must have their own Spawner MCU, or you will not get correct kill counts from a Counter MCU. I think it's likely because multiple vehicle entities object linked to a single spawner makes the vehicle entities it spawns in as 'instances' of the Spawner MCU. Therefore, with many vehicles linked to a single spawner, you get many instances of a single spawner. The Counter MCU is not counting the instances, but instead counting the Spawner MCU id. In this fashion, the counter will instead think it's the same vehicle the player destroyed previously (since it's there's multiple instances of the same spawner) and not count it correctly. If we use individual Spawner MCUs for each vehicle entity, the there's only one "instance" of the Spawner MCU. Which will in turn, give the correct count to a Counter MCU. Furthermore, when a player destroys a particular vehicle entity, and flies away; that vehicle will not respawn (unless the Capturable Airfield has been reset) when the player returns. Which would make sense to players, and would not work if we tied multiple vehicle entities to a single spawner. My logic has individual spawners for all vehicles entities. Here we can see the daisy chain of events for spawning and despawning a vehicle entity. With the issues out of the way, I can talk about the logic. When the OnKilled Counter MCU reaches the correct count, a series of events fires off. We have a Timer MCU in front of the Counter MCU. Note that the onKilled events (in purple) are not directly hitting the Counter MCU, but instead hitting the Incoming Allied OnKilled Timer MCU. This way we can stop incoming onKilled events and also reset the Counter MCU as we see fit. As I'm sure you've guessed, disabling this Timer MCU is one of the first things I do once the counter has reached the correct number. If we had all of the incoming onKilled events directly to the Counter MCU, we would not be able to reset the Counter properly. Especially because we're using a Command Destroy All Complete MCU that will send false positive onKilled events when it pulses. The Timer MCU "Incoming Allied OnKilled" gets all of the onKilled events and then passes it to the Counter MCU. With this system, I can disable the Timer, stopping all incoming onKilled events hitting the Counter. While the Timer MCU is disabled, I can then easily reset the Counter MCU back to zero, and immediately turn the Timer back on. Now that the onKilled Counter has hit the correct number, I begin a daisy chain of events. For the example below, the Capturable Airfield will get flipped to Allied side. First we wait 10 seconds. More on why we wait is in the paragraph below. Then, we deactivate the Incoming onKilled Timer (as I mentioned above). One second later, we activate the Allied Enter Gates for allowing vehicle entities to spawn in from the checkzones. Followed by deactivating the Axis Enter gates. This ensures no Axis vehicle entities spawn in. Immediately after that, I delete all of the vehicles, and destroy all of the block entities that are associated with the Capturable Airfield. I could technically only destroy Axis's blocks and vehicles, but I like to be sure I've reset everything before spawning in new items. After I've removed all the Axis entities, I repair the Allied blocks, and pulse the spawners to spawn in all the Allied vehicle entities. Then, I flip the airfield to Allied, let the players know that they control the airfield now, and set the influence zone to belong to the Allies. Next, I ensure the Allied onKilled Counter MCU has been reset to zero with a Modify Counter MCU. Finally, I activate the onAttacked subtitle messages and the Incoming onKilled Timer MCU for Allies. With that logic complete, Allies will now own the Capturable Airfield. The flow of events to convert the airfield is as follows: 10 second timer -> Deactivate Incoming onKilled events -> Activate the ability to spawn in the Allied vehicles -> deactivate the ability to spawn in Axis vehicles -> Delete all of the vehicles -> Destroy all blocks -> Repair Allied blocks -> Spawn in Allied vehicles -> flip the airfield and influence zones to Allied -> Tell the players that Allies owns the airfield now -> activate the influence zone -> reset the Allied counter to zero -> activate the onAttack messages -> activate the Incoming onKilled events Remember when I said we wait 10 seconds? That's because we need to do some logic before we can set the Capturable Airfield to Allies. What I'm doing in the image below is deactivating the onAttacked Subtitle MCUs. While I destroy and spawn in new vehicles - players will not get "We're being attacked!" messages. Then, I deactivate the influence zone, so that any players that despawn in the area, for whatever reason, will not get captured. I, of course, flip the influence zone to the correct collation and reactivate it through the logic I mentioned in the above paragraph. Finally, I flip the airfield to neutral so that no other players can spawn at the field until the entire flipping of the Capturable Airfield logic is complete. The entire process takes about 15-20seconds, and while I did not show the Axis version of this logic, all of this logic is setup for both Allied and Axis and the airfield can flip-flop hands many times over during the course of the mission. Here's what's happening while we wait 10 seconds. From left to right: Deactivate onAttack messages -> deactiave the influence zone -> flip the airfield to neutral to stop any players from spawning in while the airfield gets flipped to the opposite side. And that's the code! Seems simple enough right? Haha I'm kidding! That was hecking hard for me to figure out! Thank you for the challenge @Papagon2. Feel free to use my templates in your mission. But how do you modify the template for your own needs?? Well, continue reading below. ------------ If you don't care how it works, start reading here: If you want to adjust the amount of blocks for a particular side (I do not recommend adjusting vehicle entities), all you need to do is make sure you have object connections to the cmd Damage and cmd Repair. You also need to add onAttacked event to the onAttacked Gate IN for each block, and onKilled event to the Incoming onKilled Timer. Finally, adjust the counter as needed. Add as many blocks as you want for each side. Then after you've added your blocks, object link cmdRepair and cmdDestroyAll to each block you've added. Once that's complete, select your blocks and setup the onKilled events to the Incoming onKilled Timer MCU, and do the same for onAttacked events to the onAttacked Gate In Timer MCU. Finally, adjust the counter to match the amount of blocks and vehicles you have for that side. If you want to add different planes, you must make sure that your Allied planes are set to index 0, and your Axis planes are set to index 1. Be sure to set the index correctly for your planes, or players may be confused! Allied will have index 0 and Axis will have index 1. You can do that by going into the Plane Settings and changing the Set Index value to the correct index you want. You can easily change the index value by going into the plane settings and setting the index value to either zero or one. Here's the mission file for you to reverse engineer. It includes an Allied starting Capturable Airfield template and an Axis starting Capturable Airfield template, and an example of how to manipulate the template with larger number of blocks at Lapino. Capturable Airfield Example.zip Questions? Comments? Let me know. Edited November 25, 2022 by Sketch Clarity 1 1
Papagon2 Posted November 25, 2022 Author Posted November 25, 2022 Fells like it wassnt a noob question after all. =D Thanks for this. It will take me some time to sink this in. Something I do remember. I did not have that complex logic on my old CTA mission, for sure. So is there some work arround from my last question ? so I can open my old mission? Yet, I beleave your logic is most likley solid and what I did before works but not logic. =D While waiting and sleeping... I tried figure out why the AAA's does not spawn in when I am close by. I am a player when I host with Dserver.exe right? Anywais I will dowload the template and check if I can make sence of this as I am still fresh to the logic.
Papagon2 Posted November 25, 2022 Author Posted November 25, 2022 Changed and tested your mission now. What I have done... I copy pasted from allied and axis airfields to the other airfields. When in-game, I see the allied airfields does not spawn untill a minute of mission time has gone by. the axis airfields are up running right away. I have not been able to finish off a airfield yet since I am hadding to work. I see that it is best to be at least 2 players, should I/we destroy the airfield fast enugh. (better if can use 1 houre to test the mission than 3.) But if finish tested and all works. I wish to add more to the mission. I see the tick rate is not higher than 5 at its most. But 2-2.5 mostly. If I wish to change faction for the lapino airfield (at start) is it just for me to change the influence area and AI behaviour trigger? (if you wrote this on the post, I than have forgotten.) (me remeber what I have read once is really hard if its much to read) -Dyslectian- Regards for the help so far. When I am back from work I will cuntiniue change and test mission just so I can figure out the logic. BTW! I did see "Papagon2 has attacked an ally" msg when I attacked a enemy truck. I assume the reason is because an ally truck is allso placed there (near it) and it can take hits while its despawned? Do it allso take dmg while despawned? Regards.
Papagon2 Posted November 26, 2022 Author Posted November 26, 2022 (edited) Okay, looks like the mission is working great. Just some QoL I wish to add to it. But for now I see some issues. The C47 planes I added. Think they wont work as they should. (para drop) and I cant figure out were the logic is wrong. Axis Airfields show up right away but not Allied. Could you take a look since I have not changed any of the template you gave me? Airfield_Capture_v1.7zip Edited November 26, 2022 by Papagon2 Para drop not mantioned
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now