Capn kamikaze Posted March 5, 2019 Posted March 5, 2019 (edited) I'm having some trouble with a multiplayer mission I'm making, I want to have a flight of player controlled Su-25T's, but if that slot is not filled at the start of a mission, a replacement AI flight is spawned, but if it is filled, the replacement flight doesn't spawn. I can get the AI to spawn if the player flight isn't there, but if it is there it still spawns, is there any way to prevent that, or despawn it, I've tried setting a user flag based on if the player flight is in a zone of size 5,000,000 and then using the group deactivate command, but that doesn't seem to work, they still spawn/don't despawn. Anyone know how to do this? Edited March 5, 2019 by Cap'n kamikaze
Pac-Man Posted March 5, 2019 Posted March 5, 2019 I'm having some trouble with a multiplayer mission I'm making, I want to have a flight of player controlled Su-25T's, but if that slot is not filled at the start of a mission, a replacement AI flight is spawned, but if it is filled, the replacement flight doesn't spawn. I can get the AI to spawn if the player flight isn't there, but if it is there it still spawns, is there any way to prevent that, or despawn it, I've tried setting a user flag based on if the player flight is in a zone of size 5,000,000 and then using the group deactivate command, but that doesn't seem to work, they still spawn/don't despawn. Anyone know how to do this? I would try something like this. I'll get you better details later tonight if no one has responded Once ---- Time is more 60 (provide time to join plane) ----Group Activate (AI) -----------Time is less 120 (So AI doesnt spawn if player is shot down) -----------Unit is Dead (Player aircraft) So, if the time the server has been active is longer than 60 seconds and no one has joined the player aircraft, the AI will spawn. Also, as I mentioned above, by doing less than 120, it won't spawn later if your wingman has been lost in combat. Then to get rid of it if a player joins the aircraft later on: Once ----- Unit is Alive (Player aircraft) -------Group Deactivate(AI) That should solve your problem. However, bare in mind that once the AI is Deactivated, [sIGPIC][/sIGPIC] http://www.Vcw13.com Asus Z270 Prime-A | i7-7700k | 32G Corsair Vengeance DDR4 3200 | EVGA RTX 2080ti | 2x 960 EVO M.2 in RAID 0 | 500GB SSD | Thrustmaster Warthog | Pimax 5K Plus https://www.youtube.com/c/OverKillSims
Capn kamikaze Posted March 5, 2019 Author Posted March 5, 2019 Thanks, I'll give that a go and see if it works :)
Delta99 Posted March 7, 2019 Posted March 7, 2019 If you want to get into scripting Moose has functionality for this called AI_BALANCER My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
Recommended Posts