Pikey Posted August 19, 2015 Posted August 19, 2015 How can you get a unit you spawn via MIST to move to a moving units location? I tried moving triggers on a unit, they no longer move for me, I tried the missions attached to http://forums.eagle.ru/showthread.php?t=141929 which just doesn't do anything. nearly every script I write throws an error nowadays, I feel cursed. ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *
chromium Posted August 22, 2015 Posted August 22, 2015 If you can retrieve the spawned units name in any way, you may use the MIST go route function. Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
Pikey Posted August 22, 2015 Author Posted August 22, 2015 Hi thanks for your htoughts, I spend way too much time on this and the folloswing is what I came up with, using a Grimes script from here and MIST. In the end I used a go to random point but its based on this script; local pointObj = Unit.getByName("blueunit1"):getPosition().p for groupName, groupData in pairs(mist.DBs.groupsByName) do --List of groups by name if string.find(groupName,"red") then --searches for prefix within group names mist.groupToRandomPoint({group = Group.getByName(groupName), point = pointObj}) end end It searches by names with RED in them and if it finds none it errors so I had to be careful with the conditioning and naming (i'd prefer better error handling to be fair) Interestingly if you spam this with a continuous action units just go mental and never go to where you want. Took me ages to figure that out. So instead i slightly randomised the trigger and used an ON SHOT trigger and an only if alive condition. The end result is that any groups with red in their name will relentlessly track the blueunit. I used random respawning in a zone to make this last forever. It's quite exciting. ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *
chromium Posted August 22, 2015 Posted August 22, 2015 If you want to be able to move the blue unit with your red ones continously tracking it without going mental, you may simply launch the mist.groupToRandomPoint every 10 min using a mist.schedule function, launched one time only, with the repetition every 600 sec till "n" thousand seconds (i.e. 3600s * 5h). You may also use env.mission.coalition table instead of having name tags for the red units: you could take the first unit type of the group as a simple filter... or else build up some kind of more complex filter to correctly identify the red groups that will track the blue one (like distance to the blue units). You may have 2 blue group running where you want (maybe using CA) and the red ones that every 10 min evaluate the nearest one and track it. Finally, I may like to use the LOS function linked to something (i.e. airplane or helo) that will update the position to the red ground units only if that "something" has effectively los with your blue target. But those are simply ideas for you :) Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
Recommended Posts