If I Touch Here, You’ll See Smoke Over There.

Having been suffering from the weakest flu ever(*), I have also tackled one (hopefully one of the last) problem I’ve had with my Enemies. I have mentioned compound Enemies before, they are Enemy entities that are joined by a (one-directional) parent-relation, they have basically 3 distinct modes of getting orders:

  1. The child Enemy can copy one from the Parent.
  2. The child Enemy can have optional orders matching Parents orders. e.g. when Parent is set to shoot, the child can be set to fade-away.
  3. The child can have separate stack of orders.

The last one provided me with a problem concerning movement. The child enemies can be “stuck” to the Parent on top of moving on their own. For example, a child Enemy moving in a circle without a Parent-relation, would be circling the Parent with the relation.

As usual the solution to this proved rather simple, although I really had to work for it and it took me awhile to get there. And as often is the case, my solution broke the carefully crafted house of cards of some previous functionality. I guess I’ll have to get this back to something more simple, it sucks being a beginner.

(*) Yes, the flu being weak, not me.