MegaGlest Forum
Archives (read only) => Glest Advanced Engine => General discussion => Topic started by: geork on 9 October 2011, 21:39:28
-
Hey all!
I'm writing this because I have been having some problems with the 'build_self' skill/command, and I wondered if any of you could help. I've basiclly done a quick copy job of the stuff posted on the wiki:
<skill>
<type value="build_self"/>
<name value="build_self_skill" />
<ep-cost value="0"/>
<speed value="300"/>
<anim-speed value="300"/>
<animation path="models/defense_tower_construction.g3d"/>
<sound enabled="false"/>
</skill>
<command>
<type value="build-self"/>
<name value="build_self" tip="under_construction"/>
<display value="false"/>
<image path="images/none.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<build-self-skill value="build_self_skill"/>
</command>
but obviously changing certain parameters to fit my game. I found that the workers started repairing the buildings anyway, and as I had future plans for not allowing repairs (or was dabbling in such a thing), I took out their repair command completely, not noticing the extra parameter that shibboleth used, but that isn't really the problem. The problem is that the buildings are placed down, have 5 HP, and don't do anything....ever. the code I'm using is pretty much like the above, so is there anything I am missing? I tried reusing the be_built skill, but then the workers started building the buildings which wasn't the plan.
what can I do?
thanks.
-
Hi geork,
How do you create these units in game? "Build self" was intended to be "the other end" of a transform command, though I guess it should/could function independently of that, I will think on that (but as of now this is the only way it will work, the build-self command will never be started otherwise).
In Shibboleth workers can transform into farms and towers, the transform command's 'hp-policy' determines how many hp it 'starts' with, the information on the wiki maybe misleading on that parameter, I'll have to check that more carefully later.
Sorry for the quick response, I gotta run, will check some things and get more details for you later.
Cheers.
-
Hello
ahh okay, I see now. yeah, I was doing the old starcraft (1 and 2) protoss thing where a worker lays the foundation and the building just gets on with it, while the worker can go back to being useful (hopefully, depending on how good the micro is ;) ). I've managed to partially solve this problem by making workers lay down 'ghost' buildings, that take 1 second to construct and then can morph into the actual building in real time. Yeah, it's a bit shabby, but it sort of works
I had a question though, would it be possible to execute the morph command of my 'ghost' buildings as soon as they are constructed? that would be cool, so to save a lot of clicking :D
thanks
-
How do you create these units in game? "Build self" was intended to be "the other end" of a transform command, though I guess it should/could function independently of that, I will think on that (but as of now this is the only way it will work, the build-self command will never be started otherwise).
Thanks for clearing that up. I revised the wiki accordingly. When you get the time, could you fix the hp-policy section of XML/Commands (https://docs.megaglest.org/index.php?title=XML/Commands&action=edit§ion=178)? Not entirely sure myself as to how it works.
I had a question though, would it be possible to execute the morph command of my 'ghost' buildings as soon as they are constructed? that would be cool, so to save a lot of clicking :D
I'm afraid there is not (yet) a way to tell a unit to automatically execute a command upon creation.