so i made a mod where the automatic defences from instalations can be build, however i have a little issue, when i order an scv to build them, it instantly takes the mineral and once it starts building them again it takes mineral, also there is no build animation, after checking i noticed those turrets are considered units so i changed their flag to building, that fixed the no animation issue and the double pay issue, but gave me the problem that as soon the defence is finished building, the game crashes, ideas?
None.
You're better off modding an existing building to mimic the Turrets.
E.g. take a Supply Depot, change its building animation, its stats, and have it use the Turret's GRP.
You might want to link the Depot (or other standard building) with its default iscript and then copy/paste the relevant idle and attack animations from the Turret, while modifying the building animation to fit the turret (i.e. use the building frame GRP that the T Missile Turret uses, instead of the default Supply Depot under-construction graphic, because of size issues).
You will also have to give it the relevant buttons (and probably AI actions; I would copy these from the Photon Cannon).
Responsible for my own happiness? I can't even be responsible for my own breakfast
You need to modify the Floor Gun's iscript. Look at the iscript for some of the regular buildings. I don't believe it has the correct init/almost built animations... not 100% positive since the last time I edited the Floor Gun was for SCFC... 5+ years ago? In any case, the answer is in the iscript. You should be able to figure it out.
did modify the iscript but it would keep crashing once it tried to attack and in other momments, decided to leave it as unit and just add a note to my mod until someone comes up with a solution.
None.
Responsible for my own happiness? I can't even be responsible for my own breakfast
Would you mind posting your iscript?