Surrexen Posted August 7, 2019 Posted August 7, 2019 (edited) I'm trying to write an attack map object script, but I can't find the documentation for how to add in the "altitude above" flag like it has in the mission editor. I want this attack to be flagged to altitude above 7500m. Anyone know the syntax for how to add that in? is it just target.altitude = 7500? TargetGroupREDPIN = GROUP:FindByName(REDBomberTarget) TargetCoordForREDStrike = TargetGroupREDPIN:GetCoordinate():GetVec2() local target = {} target.point = TargetCoordForREDStrike target.expend = "Two" target.weaponType = 4161536 target.attackQty = 1 target.groupAttack = true local engage = {id = 'AttackMapObject', params = target} Group.getByName(RTREDPINGROUPNAME:getController():setTask(engage) Edit: it seems that target.altitude = 7500 and target.altitudeAbove = 7500 doesn't work. Edited August 7, 2019 by Surrexen
Hardcard Posted August 7, 2019 Posted August 7, 2019 (edited) Set the AttackMapObject trigger in ME as you would normally do, then save the mission. After that, open the generated .miz file with winRAR/WinZip/7zip, etc. Inside you'll see a file called "mission" (with no format), you need to extract that file and give it a .lua format. Then you'll be able to open it using notepad++, for instance. That file contains all the information regarding templates and triggers in the mission, so find the AttackMapObject task id inside it and you'll see how the task table is really structured. You can use this method to figure out how ALL task and unit / group / static template tables in ME are structured, so remember it Edited August 7, 2019 by Hardcard [sIGPIC][/sIGPIC]
Surrexen Posted August 7, 2019 Author Posted August 7, 2019 Ok cool I'll check it out, thanks Hardcard !
Recommended Posts