FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login

    Attack move hotkey?

    Scheduled Pinned Locked Moved General Discussion
    10 Posts 5 Posters 1.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      crispweed
      last edited by

      I just tried setting up a hotkey for 'Attack move' (i.e. to be equivalent to pressing the leftmost command button in the UI, 'Attack move'), but it looks like this is not possible?

      (In 'Orders', I can see stuff like 'Attack' and 'Move' available for mapping to hotkeys, but nothing for 'Attack move' or 'Aggressive move'.)

      Anyone know why this is?

      Is there some way I can work around this with a targeted UI mod?

      1 Reply Last reply Reply Quote 0
      • RoweyR
        Rowey
        last edited by

        Attack move is bound to alt + right-click

        "The needs of the many outweigh the needs of the few" - Spock

        C 1 Reply Last reply Reply Quote 0
        • C
          crispweed @Rowey
          last edited by

          @rowey Yeah, I know this, but I still would like to bind a hotkey.

          Note that alt + right-click is different from the 'Attack move' command mode you get when you click on the 'Attack move' button, in an important way.

          Whether or not alt + right-click actually does an attack move depends on what the mouse is over and the camera zoom level. If you alt + right-click over some reclaim, for example, this will often give a reclaim command instead.

          This is not the case when you enter Attack move command mode by clicking the Attack move button in the UI.

          1 Reply Last reply Reply Quote 0
          • RoweyR
            Rowey
            last edited by

            @Jip

            "The needs of the many outweigh the needs of the few" - Spock

            1 Reply Last reply Reply Quote 0
            • C
              cunnismeta
              last edited by

              i would like to bind attack move to middle click

              1 Reply Last reply Reply Quote 0
              • JipJ
                Jip
                last edited by

                That is not possible, it is defined in the engine.

                A work of art is never finished, merely abandoned

                C 1 Reply Last reply Reply Quote 0
                • C
                  crispweed @Jip
                  last edited by

                  @jip Maybe your reply is to cunnismeta, but, for what it is worth, I found out how to do the thing I was looking for.

                  Try the following, in the game console (with engineer or commander selected):

                  ui_lua import('/lua/ui/game/commandmode.lua').StartCommandMode("order", {name="RULEUCC_Script", AbilityName='AttackMove', TaskName='AttackMove', Cursor = 'ATTACK_MOVE'})
                  

                  Interestingly, this works better than clicking the attack move button, because you actually get the correct cursor shown while in the relevant command mode, whereas there is a problem with not seeing a change of cursor when clicking the attack move button.

                  The lua script I am copying this from is as follows:

                  local function AttackMoveBehavior(self, modifiers)
                      if self:IsChecked() then
                          CommandMode.EndCommandMode(true)
                      else
                          local modeData = {
                              name="RULEUCC_Script",
                              AbilityName='AttackMove',
                              TaskName='AttackMove',
                              cursor = 'ATTACK_MOVE',
                          }
                          CommandMode.StartCommandMode("order", modeData)
                      end
                  end
                  

                  Note the small case 'c' in cursor, which is what makes the difference. I guess this is probably a bug..

                  1 Reply Last reply Reply Quote 2
                  • JipJ
                    Jip
                    last edited by

                    @crispweed interesting find, consider it fixed:

                    • https://github.com/FAForever/fa/pull/4782

                    A work of art is never finished, merely abandoned

                    C 1 Reply Last reply Reply Quote 1
                    • C
                      crispweed @Jip
                      last edited by

                      @jip Hmm.. so the following also works correctly (shows the same attack cursor while in the new command mode):

                      ui_lua import('/lua/ui/game/commandmode.lua').StartCommandMode("order", {name="RULEUCC_Script", AbilityName='AttackMove', TaskName='AttackMove'})
                      

                      (What I did here, instead of capitalising the C, is to just leave out the 'cursor' table entry.)

                      So maybe 'Cursor' with capital C is not actually correct, then. (This was really just a random shot in the dark, on my part.) Maybe what is happening here is that there is no 'ATTACK_MOVE' cursor, so if we specify that then we don't get any cursor change, but if we instead just allow it to fall back to a default cursor (which looks like it might be the attack cursor, based on the "RULEUCC_Script" name), either by leaving out the 'cursor' table entry, or misspelling this with a capital C, things look much better..

                      1 Reply Last reply Reply Quote 1
                      • BlossomedB
                        Blossomed
                        last edited by Blossomed

                        @Jip @crispweed I see that the latest commit from Jip to Dev branch "fixed" capitalization cursor -> Cursor, but do we know if it was even a bug to begin with (Jip check reply above from crispweed)?

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post