GSHWK_Houndstone_Hawk Posted December 22, 2021 Posted December 22, 2021 Hi again. Back with another question. I've never been able to grasp the logic behind Artillery & getting A.I. Artillery to spawn in and fire. This may be largely to do with the fact that I don't fully understand how to use the force complete MCU (not knowing in its basic form, what links to & from etc). All I basically want is for a player or object to spawn in the artillery & then simply have them firing at a given location. I've included a basic example of what I'm doing & I'm suspecting I'm missing something rather obvious. If anyone could take a quick peek & tell me where I'm going wrong I'd be very appreciative as per usual. I'm not looking for anything in depth, just in its basic form, a.i. arty spawning & firing. Many thanks as always Artillery Tests.rar
AEthelraedUnraed Posted December 22, 2021 Posted December 22, 2021 There's nothing triggering the Attack Area MCU (id:33). It doesn't need to be activated however. Instead of the link from the Trigger Activate (id:16), you should have a target link from the CheckZone (id:14) to a Trigger:Timer MCU, set to 3 seconds or so to make sure the artillery is spawned before the target triggers. Then from this timer, create a target link to the Attack Area MCU (id:33). 1 1
GSHWK_Houndstone_Hawk Posted December 22, 2021 Author Posted December 22, 2021 Working like a charm. I didn't need to get rid of the activation links because if you look more closely, they're spawning in the fake vehicles & not the attack area MCU but yes I then followed your instructions in adding the 3s timer in between the CZ & the attack area & success. Thank you so much. Another valuable thing learned.
Sketch Posted December 22, 2021 Posted December 22, 2021 (edited) For those looking to see an example of how to activate and deactivate artillery, I've included a visual below. The idea is that a plane (in my case, an ai plane) enters the inner checkzone mcu. When that happens, the artillery is activated. One second later, the artillery is told to attack ground targets to the South. Once the plane leaves the outer checkzone mcu, the artillery deactivate. It's important to leave space between the inner and outer checkzones or you'll have player planes flying the edge of the checkzones activating and deactivating the artillery over and over (with spacing between the two checkzones, you eliminate this problem). Here we have an ai plane fly a circuit that forces the rocket trucks to activate and deactivate when the ai plane enters and exits the checkzone areas. Once the artillery activate, they will begin attacking the enemy convoy to the south. Here is where the magic happens. This is the checkzone logic to determine if a plane is inside the area or not. Feel free to use this checkzone logic for other activating objects too. Rocket Trucks activate from the IN GATE Timer MCU, then 1 second later are given a cmdAttackArea (from the T:1sec timer) Here is the cmdAttackArea MCU and the enemy convoy that the Rocket Trucks will hit. Here is the mission file to reverse engineer: Example Activating Artillery.zip Edited December 23, 2021 by Sketch 1
IckyATLAS Posted December 23, 2021 Posted December 23, 2021 19 hours ago, Sketch said: For those looking to see an example of how to activate and deactivate artillery, I've included a visual below. The idea is that a plane (in my case, an ai plane) enters the inner checkzone mcu. When that happens, the artillery is activated. One second later, the artillery is told to attack ground targets to the South. Once the plane leaves the outer checkzone mcu, the artillery deactivate. It's important to leave space between the inner and outer checkzones or you'll have player planes flying the edge of the checkzones activating and deactivating the artillery over and over (with spacing between the two checkzones, you eliminate this problem). Here we have an ai plane fly a circuit that forces the rocket trucks to activate and deactivate when the ai plane enters and exits the checkzone areas. Once the artillery activate, they will begin attacking the enemy convoy to the south. Here is where the magic happens. This is the checkzone logic to determine if a plane is inside the area or not. Feel free to use this checkzone logic for other activating objects too. Rocket Trucks activate from the IN GATE Timer MCU, then 1 second later are given a cmdAttackArea (from the T:1sec timer) Here is the cmdAttackArea MCU and the enemy convoy that the Rocket Trucks will hit. Here is the mission file to reverse engineer: Example Activating Artillery.zip 10.22 kB · 2 downloads I see here that the activation and deactivation is linked to the artillery vehicle leader. What happens when the leader gets destroyed in battle and disappears. This activation/deactivation link will also get cut. The following vehicle may become leader but there is no link from the deactivate/activate MCU anymore. This is why I use an invulnerable fake vehicle (invisible and slightly out of the kill zone) that acts as a leader and to whom all the units to be controlled are connected. In this way the activate/deactivate command will always works whatever the number of units remaining. A typical example is the AAA Artillery of a town, city, airfield etc. that is controlled by one Fake Vehicle and gets activated or deactivated according to the presence or not of the player inside a zone that is to be defined around that given place.
Sketch Posted December 23, 2021 Posted December 23, 2021 1 hour ago, IckyATLAS said: I see here that the activation and deactivation is linked to the artillery vehicle leader. What happens when the leader gets destroyed in battle and disappears. This activation/deactivation link will also get cut. The following vehicle may become leader but there is no link from the deactivate/activate MCU anymore. Destroying the lead vehicle does not break any of the logic, and making a fake vehicle is a nice CYA, but completely unnecessary. The next id that is alive in the formation becomes the new leader, and they still do everything they're supposed to as if the leader was alive. I just double checked the logic here: 3
IckyATLAS Posted December 23, 2021 Posted December 23, 2021 8 hours ago, Sketch said: Destroying the lead vehicle does not break any of the logic, and making a fake vehicle is a nice CYA, but completely unnecessary. The next id that is alive in the formation becomes the new leader, and they still do everything they're supposed to as if the leader was alive. I just double checked the logic here: Good to know, and thanks to test it. I did not test and immediately opted for that solution long ago. So now it is standard in my libraries for all the fixed artillery or vehicle groups. But the fact that it is not necessary to do so makes it a kind of advantage. When needed I can switch my Fake Vehicle in a real artillery vehicle and that will work same and no links to change or add. I have just an additional vehicle just switching the model of the Fake Vehicle. In fact my Fake Vehicle acts as a hidden spare additional unit. ? 1
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