Monday, April 23, 2012

[SUPCOM 1-NEED HELP]Engineers Constructing Engineers

So I modified the code in engineers so that they have their current tech level of engineer in their build tab as well as the engineer of one tech level up.
Example: A T1 Engineer could build T1s and T2s of itself.
However, there is one problem. The game does not recognize them as structures, so I cannot do a "place and click" build order for them, as they are normally made in factories.
How do I get Sup Com 1 to recognize Engineers as buildings for dragging and dropping?
I think it is possible (In the Blackops: Unleashed mod, the UEF had a heavy assault T3 unit of some sort in the structures tab) But I also want Engineers to still have the ability to be produced at a factory.
(Oh, and by the way, I'm not technically making a mod, just rewriting some lines of code in a copy of the units.scd file, and then replacing the current units.scd with the modded one. Don't worry, original is backed up!)
EDIT:
Okay, I've figured it out.
I've put the attributes
'DRAGBUILD',
'NEEDMOBILEBUILD',
In my Engineers' codes. Now they can be built by engineers.
However, when I build them at a factory they act like structures!(Example: I have to "place" one right by the factory to get it to build one ) How
do I get the game to recognize them as a "normal build" when made at factories
and a
'DRAGBUILD',
'NEEDMOBILEBUILD',
when built by engineers?
Oh, and by the way, I just thought of something else:
What piece of code makes structures amphibious?
EDIT: Just had another question. Should I start new topics for new questions or continue in this topic?
Help would be appreciated,
Helios|||First things First, amke sure you post in teh correct forum, Moid Dev Support is for asking questions about the making of mods, while mod talk is for talking about Mods themselves.
Thread Moved.
Mike|||OrangeKnight|||CommanderHelios|||There is no way to make a unit both mobile-buildable and factory-buildable without the side effect of having to place them at the factory.
There is a workaround that involves making a completely new dummy unit that uses the same blueprint and mesh as the actual unit, and in its script's OnStopBeingBuilt, it creates one of the actual unit in its place, and destroys itself. The process appears more or less seamless, and factories still build the original unit (which doesn't have NEEDMOBILEBUILD), while engineers can build the dummy unit.
The dummy unit's categories would need to be adjusted so that NEEDMOBILEBUILD and DRAGBUILD are added, and BUILTBYTIER1/2/3FACTORY is removed and replaced by BUILTBYTIER1/2/3ENGINEER and/or BUILTBYTIER1/2/3COMMANDER as appropriate to make it buildable by engineers/ACUs.

Are you doing this as a merge mod, or just overwriting blueprints?|||Mithy|||CommanderHelios|||Mithy

No comments:

Post a Comment