BL Coding (Some?) AI movement orders don't seem to work

正在查看此主题的用户

HateDread

Recruit
I've set up my own MissionView, and in its OnMissionScreenTick, I check input to drive some orders to the player's formations.

From OnMissionScreenTick, I'm trying a bunch of different movement orders, but they... don't seem to do anything / do unexpected things.

  • OrderController::SetOrder(OrderType.AdvanceTenPaces)
    • There is audio of advancing, but the selected formation(s) don't move.
    • I made sure to try first setting the formation to move so it gets through the if statement here, and it does, and calls MovementOrder::Advance, but that does nothing
      C#:
      case OrderType.AdvanceTenPaces:
        using (List<Formation>.Enumerator enumerator = this.SelectedFormations.GetEnumerator())
        {
          while (enumerator.MoveNext())
          {
            Formation current = enumerator.Current;
            if (current.MovementOrder.OrderEnum == MovementOrder.MovementOrderEnum.Move)
              current.MovementOrder.Advance(current, 7f);
          }
          break;
        }
  • OrderController::SetOrderWithFormation(OrderType.ChargeWithTarget, targetFormation)
    • The units in the selected formations merely charge at the closest enemies, rather than the specified target formation. I've tried inspecting my formation's movement order after this on later frames to make sure things aren't being overwritten, and they're not - the order and its target formation property persist, but just doesn't work.
    • Where is the logic for deciding on an individual agent's charge target? Can I override this / patch with Harmony?
  • OrderController::SetOrderWithFormationAndNumber(OrderType.Attach, targetFormation, (int)MovementOrder.Side.Front)
    • The selected formations sometimes move a little when you give this order, but it's to some fixed position unrelated to the position of targetFormation, and they do not move when targetFormation moves.

Am I missing something? A bunch of these orders just don't seem to work, and the one that does is not doing what it says on the tin :smile:
 
最后编辑:
后退
顶部 底部