=DW=_Tauront Posted June 23, 2022 Posted June 23, 2022 Hello there, just wanted to ask some questions about AI in dogfight mode.Is this possible to trigger AI units to spawn/move/follow players when players will reach the waypoint that I placed?
firdimigdi Posted June 23, 2022 Posted June 23, 2022 As far as I understand AI in dogfight mode are oblivious to players - they just know about sides and their own flights (if they are pre-spawned only and then activated - if you spawn them they don't even know about flights and formations).
JimTM Posted June 23, 2022 Posted June 23, 2022 (edited) 6 hours ago, ACG_Tauront said: Hello there, just wanted to ask some questions about AI in dogfight mode.Is this possible to trigger AI units to spawn/move/follow players when players will reach the waypoint that I placed? Player planes will not trigger a waypoint. You'll need one of the following at your desired location to detect player planes: A check zone trigger - This can detect player planes from a particular coalition A complex trigger translator - This can detect player planes using various criteria, that is, countries, scripts (i.e., particular types of objects such as Bf109 F-4, FW190 A3, etc.), and objects with particular names (assigned in the Name field of the Plane Settings dialog for each plane you add to a MP spawn point). You can specify multiple values for multiple criteria. You can have the detection trigger a spawner for AI, but you cannot command the AI to follow MP player planes (you can do that in a SP mission using, for example, the cover command). For details on the check zone trigger and complex trigger translator, see the editor manual. Edited June 23, 2022 by JimTM 1
Zooropa_Fly Posted June 24, 2022 Posted June 24, 2022 Hey Jim, Can they not be 'activated' into the game with a check-zone, rather than spawned ?
Sketch Posted June 24, 2022 Posted June 24, 2022 They can be either spawned in or activated. Activated entities respect all 'Command' MCUs (such as Command Formation), but activated entities can not respawn in after being destroyed. On the other hand, spawned entities can be respawned over and over if the mission designer chooses. But spawned entities do not follow all of the 'Command' MCUs as they act independently. If you used a spawned entity, you will have to give each one their own waypoint, attack command, and so on. I mostly use activated entities. Here's an example image: In this image, We have a checkzone looking for allied planes. Once the player spitfire (and his wingman ai) enter the checkzone, the four enemy Bf109s will spawn in. After 3 seconds, the Bf109s will begin chasing and attacking the player spitfire and the wingman spitfire. The enemy Bf109s will do this until they're dead or the player and his wingman are dead. Here's the group to reverse engineer: ActivatedBf109s.zip ------------------ Here is an example of spawned entities. Notice how they each have their own set of logic. The reason you'd use spawned entities is for 'wave-like' enemies. In this example, enemies will keep respawning and attacking the player and his wingman until four planes are destroyed. Here is the entire logic for you to look at. Notice how each plane has their own logic. Which is Spawn in -> 3 seconds -> attack player and wingman until death. Here's a close up of the single plane logic. After the enemy plane dies, it waits 3 minutes and then spawns another plane. This repeats itself until at least four planes are destroyed. Here we have a simple four count counter looking for enemy Bf109s destroyed. Once the counter fires, the respawning gets deactivated. Finally, a close up of the start gate. The respawning event doesn't fire until the player enters the checkzone. Once they enter the checkzone, I deactivate the start gate so that it can not fire again. Here is the group to reverse engineer: RespawnWaveBf109s.zip Good luck with your mission building! 1
=DW=_Tauront Posted June 29, 2022 Author Posted June 29, 2022 Alright then, thank you guys for your replies! Much appreciate that!
AEthelraedUnraed Posted June 30, 2022 Posted June 30, 2022 On 6/24/2022 at 2:51 PM, Sketch said: On the other hand, spawned entities can be respawned over and over if the mission designer chooses. But spawned entities do not follow all of the 'Command' MCUs as they act independently. If you used a spawned entity, you will have to give each one their own waypoint, attack command, and so on. I'd like to elaborate a little. Spawned entities do in fact follow all of the Command MCUs. What doesn't work, is formations. You cannot formation-link spawned entities to other entities. Also, you can only use one active instance of a spawned object at a time (i.e. only respawn after the previous instance has been killed/deleted) or else strange behaviour might result. For single aircraft, I prefer to use spawners since their "OnSpawned" message provides a clean way to link their first waypoint (or other MCU), and it is quite easy to randomise the start location by using a couple of spawners.
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