Not all multi-selected units move if one of them dies when multi-selected

I’m not sure if this will be covered in a future lecture or not, but while testing the game at the end of this section (Destroying Units and Buildings) I found a bug.

Not all multi-selected units move when commanded if one of them dies when multi-selected.

To get all units to move again I have redo the selection.

To reproduce:

  1. Need two players
  2. As player 1, drag to select three or more units
  3. As player 2, direct units to kill the 2nd of the three units
  4. As player 1, you should only have two units (or x-1 units). Direct them to move
  5. Only the first unit moves. The 3rd unit does not.

I suspect there is a null value in a list when CmdMove tries to get called. It fails and stops the whole operation.

2 Likes

Privacy & Terms