mattag08 Posted June 5, 2024 Posted June 5, 2024 (edited) Is there an "easy" way in MIST/MOOSE or the base editor to set up an F10 spawn relative to a player unit/group? I'm currently trying to puzzle out a way to create a BFM/ACM trainer mission. The goal would be to allow the player to select from options in the F10 radio menu such as "forward quarter", "beam quarter", "rear quarter", or "random" and have an enemy aircraft spawn in that area. I would need to be able to define a distance, range, altitude, speed, heading, etc. for the unit spawned and make all of those parameters relative to the unit (or preferably the centroid of the group) requesting the spawn. I'm sure this is possible with enough code, but I frankly don't have the time to write the entire thing from scratch. Are there any functions in MIST/MOOSE/etc that provide a functionality like this or has anyone been able to produce something similar? UPDATE: I've sorta got the logic of what I want to do down, but my LUA skills or MIST understanding are clearly lacking. Here's what I came up with, but can't get to run: blue_pos = mist.getLeadPos("Wolf 1") blue_pos_north = mist.projectPoint(blue_pos, 6000, mist.utils.toRadian(360)) teleport_north = { point = blue_pos_north, gpName = "north_mig23", action = respawn } mist.teleportToPoint(teleport_north) The goal of the code here is to get the position of Wolf 1, adjust that point 6,000 meters north, then create a table for MIST to use to spawn a Mig-23 group there. If anyone could help with what syntax or other error I'm making that would be super. Edited June 5, 2024 by mattag08 Flying the DCS: F-14B from Heatblur Simulations with Carrier Strike Group 2 and the VF-154 Black Knights! I also own: Ka-50 2, A-10C, P-51D, UH-1H, Mi-8MTV2, FC3, F-86F, CA, Mig-15bis, Mig-21bis, F/A-18C, L-39, F-5E, AV-8B, AJS-37, F-16C, Mig-19P, JF-17, C-101, and CEII
mattag08 Posted June 5, 2024 Author Posted June 5, 2024 Disregard, I figured it out. Here's the code if anyone wants to do something similar: local blue_pos = mist.getLeadPos('wolf1') local blue_pos_north = mist.projectPoint(blue_pos, 6000, mist.utils.toRadian(360)) local teleport_north = {} teleport_north.point = blue_pos_north teleport_north.gpName = 'north_mig23' teleport_north.action = 'respawn' mist.teleportToPoint(teleport_north) Flying the DCS: F-14B from Heatblur Simulations with Carrier Strike Group 2 and the VF-154 Black Knights! I also own: Ka-50 2, A-10C, P-51D, UH-1H, Mi-8MTV2, FC3, F-86F, CA, Mig-15bis, Mig-21bis, F/A-18C, L-39, F-5E, AV-8B, AJS-37, F-16C, Mig-19P, JF-17, C-101, and CEII
Recommended Posts