Author Topic: toggle auto-attack mode  (Read 3033 times)

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 487
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
toggle auto-attack mode
« on: 18 January 2016, 19:49:25 »
Slightly related to unit patrolling

I would like to suggest a way to toggle "attack-mode" during movement. For example, if I tell soldiers to move, they will automatically go into "attack-mode" when enemy is in range.

And "auto-attack-mode" would also be in effect when newly created units exit from a structure and move to a preset position. Sometimes a preset position has been overrun, and it would be helpful if they would stop sooner and join a battle.

But sometimes auto-attack wouldn't be wanted, and that's why I mention being able to toggle between auto and manual. (except for units on "patrol" - always auto)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: toggle auto-attack mode
« Reply #1 on: 19 January 2016, 11:17:35 »
The idea with newly created units to go into attack mode is good,

But the idea with the toggle is not very clear to me yet.  Or do you think about having the original "move" to be an "attack command" when clicking to the ground?
Then we will have a problem to move fighters in a battle, because they would stay in attack mode as long as there is an enemy in range. So we would need a new way to give a command like "move without attack".
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 487
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
Re: toggle auto-attack mode
« Reply #2 on: 24 January 2016, 00:59:50 »
I will try to better explain what I meant.

Example: When the game starts, I press <ctrl> + a.

Now anytime I move units, (or when newly created units exit buildings) they will automatically attack if they suddenly encounter enemy units.

If i am in a battle, and want to disengage auto-attack, I press <ctrl> + a again to toggle auto-attack to the "off" position.

To help make it more clear, this feature would make it so "a" + point and click would not be needed as often.

But now that I think more about it, it's probably not a very needed feature. Do any players more experienced than myself think this would be a good feature?


Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
I'm not sure I agree that it's a "desired" feature for short sighted units to sit there when being attacked. If they were controlled by a human player, you'd probably just follow the projectile to find the attacker. Which is the simplest option: move in attack mode in the direction of the projectile.

If we wanted more depth, we should consider that the projectiles aren't necessarily visible (and thus it's hacky to know the direction of the attacker). A field could be used to determine if the projectile is visible. If so, move towards projectile (or run away if you can't attack). Otherwise random walk (which would hopefully either escape the attacker or find them). Of course, this gets complicated because an intelligent AI wouldn't walk randomly, but rather would probably move towards fog of war (or maybe towards allies).
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

thiemo

  • Swordman
  • *
  • Posts: 17
    • View Profile
Re: toggle auto-attack mode
« Reply #4 on: 20 March 2017, 11:28:56 »
I feel there is much overlapping to https://forum.megaglest.org/index.php?topic=9819.0

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: toggle auto-attack mode
« Reply #5 on: 20 March 2017, 12:28:06 »
Im not entirely sure here, but isn't the current implementation that if units are given a move command they are moving towards the point without engaging thier enemies?, and if they are given a attack command they will move towards a point but attack all enemies in thier way?.

To be honest i feel that is the correct way to do it, If you want your units to move somewhere keep a eye on them.  Most of the time your eyes should be on your units anyway, i really beleive that chaning this mechanic would make Megaglest less interesting and challenging as a game.

Also don't we already have a "hold position" mode that holds units in place while attacking nearby units that are in range?
WiP Game developer.
I do danish translations.
"i break stuff"

 

anything