Author Topic: build_self problems  (Read 1152 times)

geork

  • Guest
build_self problems
« 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:
Code: [Select]
<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.
« Last Edit: 10 October 2011, 05:10:55 by Omega »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: build_self problems
« Reply #1 on: 10 October 2011, 19:30:47 »
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.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

geork

  • Guest
Re: build_self problems
« Reply #2 on: 10 October 2011, 19:53:30 »
 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

   

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: build_self problems
« Reply #3 on: 11 October 2011, 01:16:54 »
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? 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.
« Last Edit: 18 June 2016, 13:17:11 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert