Author Topic: Objective attack  (Read 803 times)

Tiel

  • Archer
  • *
  • Posts: 30
    • View Profile
Objective attack
« on: 25 December 2014, 06:54:24 »
I realize moving while attacking isn't really a thing and probably won't be for megaglest's near future, but I was wondering if there's any way to remove the prerequisite for the unit to turn and face an object prior to attacking it? I'm a novice at programming but if someone could kick me in the right direction that'd be great.

(what I want to do is have the unit utilize the attack_stopped type instead to simulate the effect, without the turning giving it away)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Objective attack
« Reply #1 on: 27 December 2014, 10:27:27 »
Units are already able to do this if they don't have a move skill but do have an attack skill (eg, Tech's defence tower). However, you can't currently have a moveable unit that does this.

So you'd have to implement it yourself if that's the case that you want.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Tiel

  • Archer
  • *
  • Posts: 30
    • View Profile
Re: Objective attack
« Reply #2 on: 28 December 2014, 00:45:22 »
Where is it handled? I've been poring over the source since I made this topic, but I don't have the familiarity with the methods called to really do so effectively (yet to find anything). Although the code is commented in places and the text isn't the gibberish to me it was a year ago I still remain perplexed.

 

anything