Mosshadow 5 Posted February 22, 2016 How can I get my AI to use sandbags? MCC's Fortify command works decently for getting them into static weapons, buildings and occasionally bunkers but it does not work for sandbags and other placed walls because they are not considered buildings. Are there any scripting solutions or AI mods that will fix this? Share this post Link to post Share on other sites
TedHo 53 Posted February 24, 2016 I'm not sure if any such script/mod exists. It's tricky for the following reason. With buildings, a bunch of positions in the interior of the buidling (buildingPos) is defined in the config file, and MCC most likely makes use of that to spawn units inside buildings. The thing with sandbags is that there's no interior/exterior so defining fixed positions relative to the sandbag object can be a little tricky. It's easy to imagine AI units spawning on the wrong side of the sandbag. 1. You can still do some config editing and try to define buildingPos for sandbag objects (look at config entries for existing buildings for reference), but make sure you place sandbags in the correct orientation before spawning units with MCC. 2. A way to do this via script and without addons is to using modelToWorld to get relative positions from the sandbag object. Again you need to make sure sandbags are placed in the correct orientation. 3. You could also manually define a list of absolute positions for units to occupy/spawn at. And then randomly select from these positions when you spawn units. 4. You could also manually place everything, this should be a lot easier since Eden release. 1 Share this post Link to post Share on other sites
Mosshadow 5 Posted February 25, 2016 I'm not sure if any such script/mod exists. It's tricky for the following reason. With buildings, a bunch of positions in the interior of the buidling (buildingPos) is defined in the config file, and MCC most likely makes use of that to spawn units inside buildings. The thing with sandbags is that there's no interior/exterior so defining fixed positions relative to the sandbag object can be a little tricky. It's easy to imagine AI units spawning on the wrong side of the sandbag. 1. You can still do some config editing and try to define buildingPos for sandbag objects (look at config entries for existing buildings for reference), but make sure you place sandbags in the correct orientation before spawning units with MCC. 2. A way to do this via script and without addons is to using modelToWorld to get relative positions from the sandbag object. Again you need to make sure sandbags are placed in the correct orientation. 3. You could also manually define a list of absolute positions for units to occupy/spawn at. And then randomly select from these positions when you spawn units. 4. You could also manually place everything, this should be a lot easier since Eden release. Thanks, I've ended up just sticking them manually and setting them to never take cover and never move. Share this post Link to post Share on other sites