After a long time without access to the COH tools, I've finally been able to spend some time trying your advice. It seems COH just doesn't like what I'm trying to do.
I had some promise with attachments, but I'm going to cut my losses and either learn more before I try again or attempt it in the tools in the third.
Anyways, thank you for your help. |
I'm very new to modding COH2, started a few days ago and after getting a hang of the basics and playing around with custom emplacements and making a few of my own, I had an idea for garrisoned emplacements. Where say for example the pit_small from the bofors can be garrisoned with any anti tank gun squad and said gun and crew will appear and animate, exactly like if they were the on_construction_squad with the pit.
Now the trouble is I've tried applying animator_set_state and apply_crew even add_crew to both the on_construction_actions and on_loaded_squad/on_loaded_hold. The best I can achieve is to get the squad and gun in the hold, with the crew animated as garrison, but the gun completely invisible. I also have troubles with having regular infantry squads garrisoned inside also not animating.
I tinkered a bit with abilities and upgrades to make exceptions where the pit would be added to the loadout, or spawning a new building, but couldn't get anything to work. There don't seem to be many options for a clean spawn and despawn action.
So far the best I can work out is animating the gun only works the normal way if it's a building and squads/crews seem to only animate if there's a squad with both the emplacement and gun (both structures) in on_construction_squad.
I cannot be the first person to have this idea, yet info on different guns and emplacements seems to be sparse outside of the original "packaged" emplacement structures. Even info on garrisoning AT guns in buildings is hard to find. For both you normally end up finding discussions on game balance, tips for handling emplacements in game and questions about making the 25-pounder emplacement. Which makes me wonder if what I'm trying is even possible. |