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:
- Need two players
- As player 1, drag to select three or more units
- As player 2, direct units to kill the 2nd of the three units
- As player 1, you should only have two units (or x-1 units). Direct them to move
- 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.